Estou tentando controlar o Windows Update a partir do menu de contexto do botão direito. Eu tenho chaves de registro que adicionam e/ou removem valores no registro que realizam isso. Eu posso executar com sucesso um único comando.
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"
Preciso executar dois comandos ao mesmo tempo, mas quando adiciono um segundo comando, nenhum dos comandos será executado.
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"