install.cmd file broken?
Soltinator opened this issue · 1 comments
Soltinator commented
i ran the command both with powershell and cmd with and without admin. all of it i got the same error.
usbip_windows_v2.0> .\install.cmd
\usbip_windows_v2.0\install.cmd\" '" was unexpected at this time.
is this a issue on my side or this is a issue with the code?
i tried to fiddle with it. im guessing the issue is from the first line.
pushd "%~dp0" && net sess 1>nul 2>nul || (powershell -ex unrestricted -Command "Start-Process -Verb RunAs -FilePath '%comspec%' -ArgumentList '/c \"%~f0\" %*'" >nul 2>nul & exit /b 1)
barbalion commented
This line ensures that the script is run with elevated privileges (it re-runs the script by PowerShell command RunAs when necessary). It's a bit dirty since the batch-files are limited in proper quote escaping. You can easily remove this line, if you experience any problem with it. In this case you should run it "As Administrtor" manually.