Run reg command in cmd (bat file)?

后端 未结 4 2105
忘了有多久
忘了有多久 2020-12-05 13:09

I\'m trying to run this reg code in cmd (bat file), but I couldn\'t make it work. Where am I doing wrong?

[HKEY_CURRENT_USER\\Software\\Policies\\Microsoft\\         


        
4条回答
  •  时光说笑
    2020-12-05 13:25

    You will probably get an UAC prompt when importing the reg file. If you accept that, you have more rights.

    Since you are writing to the 'policies' key, you need to have elevated rights. This part of the registry protected, because it contains settings that are administered by your system administrator.

    Alternatively, you may try to run regedit.exe from the command prompt.

    regedit.exe /S yourfile.reg
    

    .. should silently import the reg file. See RegEdit Command Line Options Syntax for more command line options.

提交回复
热议问题