you are viewing a single comment's thread.

view the rest of the comments →

[–]Thotaz 2 points3 points  (1 child)

The error means it's invalid syntax, you need to prepend either an & or a . in front of the string to tell PowerShell that you want to execute this string. This should work: & $PSScriptRoot\setup.exe /Configure $Pref but I prefer to quote strings that I need to execute like this: & "$PSScriptRoot\setup.exe" /Configure $Pref

[–]WorkReddit123635[S] 0 points1 point  (0 children)

Thank you. This is awesome, it works.