Reputation: 164
I have following command:
exec 'powershell.exe -ExecutionPolicy RemoteSigned -Command & "{[Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\ProgramFiles\Java\jre1.8.0_60\bin", "Machine");$env:JAVA_HOME}"'
It's not working because the external double quote is getting closed by another double quote. How do I resolve this problem?
Upvotes: 0
Views: 172
Reputation: 168071
If you want a string fragment that would be interpreted as an escaped double quote, then you need to escape the escape character: \\"
.
Upvotes: 1