Adding environment variable from command prompt / batch file

后端 未结 2 2017
庸人自扰
庸人自扰 2021-01-16 17:25

I am trying to add a environment variable (System) in my batch file. The below command says ERROR: Invalid syntax. Can some one help. For me it looks good.

r         


        
2条回答
  •  暖寄归人
    2021-01-16 18:12

    I think you need to quote the registry key as it has spaces

    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v ToDelete /t REG_SZ /d "192.168.00.00"
    

提交回复
热议问题