Client Management Suite

 View Only
  • 1.  Restart status notification

    Posted Jul 19, 2012 04:57 AM

    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 ?

    Cheers

    Joe.

     

    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

     

     



  • 2.  RE: Restart status notification

    Posted Jul 26, 2012 04:12 PM

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