Video Screencast Help
New Company Name and Logo Announced. Learn More.

Restart status notification

Created: 19 Jul 2012 • Updated: 19 Jul 2012 | 1 comment

I want to run an update job to PCs and set the restart status to true. I use the script below given to me by a helpful person on this forum. My question is - when this reboot stautus is changed does the user get the sme notification they would get when patch management has completed and prompts the user to reboot now or later (i'm hoping it does)

Update :  on testing this i notice that it always sets the status to reboot - even if the product is detected. Anyway I can make this conditional on not detected only ?



strRegPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\Altiris Agent\Patch Management\"
strRegType = "REG_DWORD"

strComputer = "."
Set objShell = CreateObject("WScript.Shell")
'Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objReg = GetObject("WinMgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
Set objWMIService = GetObject("WinMgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

objReg.EnumKey HKLM, strRegPath

objShell.Regwrite strRegPath & "RebootRequired","1",strRegType

Comments 1 CommentJump to latest comment

mclemson's picture

If it were to work, I'd imagine you would need to run a Software Update cycle first using AeXPatchUtil.exe /xa.

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner