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.
my latest creation is an overhaul to the setuser.vbs that is in the tools download. i'm creating a helpdesk tool to allow them to create users and machines, then link them without console access.
a future upgrade will allow them to view assigned users.
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.