Try this, where command is the DOS thing you want...
Set objExecObject = objShell.Exec("cmd /c command")
do until objExecObject.StdOut.AtEndOfStream
strNextLine = split(AobjExecObject.StdOut.ReadAll, vbCrLf)
//Peter
Hmm maybe use WMI?
Loop the whole thing with a 10 sec delay and put in a reboot section if the app is not running.
//Peter
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &...
This one looks if the SAMAccountname "PeterW" is in use in the "Users" OU in the domain "domain".
If it doesnt find it it will tell you that and if it finds it then you'll see the dn path and so on.
//Peter
Set objConnection =...
Change hostname should be rather easy, but computername could be harder, since the domain has the name there too... have a look at the ADMT tool there you can rename computer accounts batch wise
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.