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
Good script. You get my vote.
1 of 1 people found this helpful
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.
Samuri.... your Script Fu is strong.
I say it is Script-Shui or Script-Zen. Safebootsamurai can script while blindfolded!
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'm always interested in the things you script.
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.