I made a NSIS installation program which fire some Powershell commands. I have the following
powershell -ExecutionPolicy Bypass Set-ItemProperty "HKCU:\Control Panel\International" -Name "sDecimal" -Value "."
I want to change the decimal separator from ,
to .
, but if I the command that way I get an error:
A positional parameter cannot be found that accepts argument 'Panel\International'.
But if I open the Registry Editor, that path exists. Any hints? How can I fix this to use my desired separator?
Disregard this answer, it's wrong as detailed in comments.
See the other answers for correct solutions.
You are in CMD. You should encapsule the powershell command in single quotes, otherwise CMD doesn't realizes it's all the same command.
powershell -ExecutionPolicy Bypass 'Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name "sDecimal" -Value "."'