Hi to all gurus
I have built a Visual studio 2019 community edition package.
When I run the uninstall process in a batch, its works fine:
"c:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" uninstall --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" --quiet --norestart
When trying with PowerShell code, its failing. I have tried all kind of quotation marks options, but all is failing.
Message : Cannot process argument transformation on parameter 'WindowStyle'. Cannot convert value "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" to type "System.Diagnostics.ProcessWindowStyle".
Error: "Unable to match the identifier name C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community to a valid enumerator name. Specify one of the following enumerator names and try again: Normal, Hidden, Minimized, Maximized"
InnerException : System.Management.Automation.ArgumentTransformationMetadataException: Cannot convert value
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" to type
"System.Diagnostics.ProcessWindowStyle". Error: "Unable to match the identifier name C:\Program Files
(x86)\Microsoft Visual Studio\2019\Community to a valid enumerator name. Specify one of the following
enumerator names and try again:
[I used the following command line in PSADT]
Execute-Process -path "c:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" uninstall --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" -parameters "--quiet --norestart"
Can you please help.
Thank you so much
Amir