批处理:注册表键值中截取字符串

如题所述

第1个回答  2020-03-14
@echo
off
>>"%temp%.\test.reg"
echo
windows
registry
editor
version
5.00
>>"%temp%.\test.reg"
echo.
>>"%temp%.\test.reg"
echo
[hkey_local_machine\software\microsoft\windows
nt\currentversion\winlogon]
>>"%temp%.\test.reg"
echo
"userinit"="c:\\windows\\system32\\userinit.exe,"
start
/wait
regedit
/s
"%temp%.\test.reg"
del
"%temp%.\test.reg"
pause
不会吧,改了点儿,再试试,保存为bat文件过后以管理员身份运行,不是什么高手哈……
带着迷惑,在自身的win7系统下测试了一下,没有问题啊……
我是先在注册表里面把那个键值修改为楼主那样,然后把以上代码保存为test.bat,然后双击运行的,运行完成后注销,重新登录,查看注册表里已经修改了啊。。。。
相似回答
大家正在搜