diff --git a/src/process.ts b/src/process.ts index ba0e64c6c9..bbbfb1d567 100644 --- a/src/process.ts +++ b/src/process.ts @@ -69,9 +69,10 @@ export class PowerShellProcess { powerShellArgs.push("-ExecutionPolicy", "Bypass"); } + this.startArgs = this.startArgs.replace(/'/g, '"'); powerShellArgs.push( "-Command", - "& '" + PowerShellProcess.escapeSingleQuotes(startScriptPath) + "' " + this.startArgs); + "'& \"" + PowerShellProcess.escapeSingleQuotes(startScriptPath) + "\" " + this.startArgs + "'"); let powerShellExePath = this.exePath;