This is an interesting forum thread about what I’ve spent the last 2 hours researching: How to properly quote commands with parameters and interpolated paths so that they will execute as a command. Doesn’t seem like it should be so hard. Here is an example of the code I’m working with:
The command I’m trying to run:
C:\Program Files\Mozilla Firefox\firefox.exe -createprofile myTest
# Here is what works in MS-Dos / Windows XP command prompt:
"C:\Program Files\Mozilla Firefox\firefox.exe" -CreateProfile myTest
PS C:\Documents and Settings\nunya> “C:\Program Files\Mozilla Firefox\firefox.exe” -CreatProfile myTest
You must provide a value expression on the right-hand side of the ‘-’ operator.
At line:1 char:48Unexpected token ‘CreatProfile’ in expression or statement.
At line:1 char:49Unexpected token ‘myTest’ in expression or statement.
At line:1 char:62