Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinSxS Optimization - progessbar value grab from live log #158

Open
matthias-schlimm opened this issue Dec 24, 2019 · 1 comment
Open

WinSxS Optimization - progessbar value grab from live log #158

matthias-schlimm opened this issue Dec 24, 2019 · 1 comment

Comments

@matthias-schlimm
Copy link
Collaborator

@matthias-schlimm matthias-schlimm commented Dec 24, 2019

the value for the progressbar can be grabbed from C:\Windows\Temp\WinSxs.log

it looks like this in the last line until 100% is reached

[================88.2%================ ]

with regular expression, we can grab the value and used it for the progressbar

[regex]::matches($value, "\d\d.\d")

Groups : {0}
Success : True
Name : 0
Captures : {0}
Index : 17
Length : 4
Value : 88.2

([regex]::matches($value, "\d\d.\d")).value

@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator Author

@matthias-schlimm matthias-schlimm commented Dec 28, 2019

$file = (Get-Content "C:\Windows\Temp\WinSxs.log")[-1]
$value = ([regex]::matches($file, "\d\d.\d")).value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant
You can’t perform that action at this time.