As part of an automated install process I need to write a script that checks that the first sync has completed and then reboots the machine. Any Ideas where to start?
Why is it that I always have a burst of intelligence after I give up and ask for help.
Posted for anyones interest or general flaming on how I could have done it better.
strCheck = 0
Set objShell = CreateObject("WScript.Shell")
objShell.Run "regsvr32.exe /s c:\program files\mcafee\endpoint encryption for pc\sbadmcom.dll"
Do Until strCheck = 1
Set objScriptExec = objShell.Exec("C:\Program Files\McAfee\Endpoint Encryption for PC\SbAdmCL.exe -command:issyncinprogress")
strSyncStat = objScriptExec.StdOut.ReadAll
If InStr(strSyncStat, "SyncData = 0") Then
objShell.Run "%comspec% /c shutdown /r /t 5 /f", , TRUE
strCheck = 1
strCheck = 0
You could steal this function out of AutoDomain - there's a whole class in it which does nothing but handle SBADMCL in VBS, and it uses the COM object, so no nasty shelling out to dos..
But, what you have indeed will work fine.
I just wrote a couple of generic HTA's to do similar things - emulate the login box, plus get question/answer combinations. If you're interested I'll post them.
i luv these, and will borrow the other if you sharing only, would love to see the new project when your done.
Also anyone know where i can get my hands on a new copy of a mini admin tool that i can use in my enviroment, lost my copy on a format.