我试图通过右键单击上下文菜单控制 Windows 更新。我有注册表项,可以在注册表中添加和/或删除值来完成此操作。我可以成功执行单个命令。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Windows Update]
"SubCommands"="Pause updates;Resume updates;Show or hide updates;Open Windows update"
"icon"="wuapi.dll,-0"
"Position"="Bottom"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Pause updates]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Pause updates\command]
@="reg import pausewu.reg"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Resume updates]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Resume updates\command]
@="reg import resumewu.reg"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Show or hide updates]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Show or hide updates\command]
@="cmd /c wushowhide.diagcab"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Open Windows update]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Open Windows update\command]
@="cmd /c start ms-settings:windowsupdate"
我需要同时执行两个命令,但是当我添加第二个命令时,两个命令都不会运行。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Windows Update]
"SubCommands"="Pause updates;Resume updates;Show or hide updates;Open Windows update"
"icon"="wuapi.dll,-0"
"Position"="Bottom"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Pause updates]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Pause updates\command]
@="reg import pausewu.reg" && echo "cmd /c start ms-settings:windowsupdate"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Resume updates]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Resume updates\command]
@="reg import resumewu.reg" && echo "cmd /c start ms-settings:windowsupdate"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Show or hide updates]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Show or hide updates\command]
@="reg import resumewu.reg" && echo "cmd /c wushowhide.diagcab"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Open Windows update]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Open Windows update\command]
@="cmd /c start ms-settings:windowsupdate"