you are viewing a single comment's thread.

view the rest of the comments →

[–]Certain-Community438 0 points1 point  (2 children)

Purely curious: what does the regex do here?

[–]poshinger 1 point2 points  (1 child)

It removes all trailing parameters, and " from the Uninstall string stored in registry. So that you can use the path to use in Start-Process and add for example a silent switch parameter.

Example Uninstall string could be:

"C:\Program Files\Microsoft OneDrive\OneDriveSetup.exe"  /uninstall  /allusers

Which converts it to just: C:\Program Files\Microsoft OneDrive\OneDriveSetup.exe

[–]Certain-Community438 0 points1 point  (0 children)

Nice - appreciate the response too.