Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WSH remote shutdown of non-WMI XP Embedded

8 views
Skip to first unread message

sham...@gmail.com

unread,
Oct 16, 2006, 10:48:53 AM10/16/06
to
Hi all,

Need some help here. We have a ton of XPe thinclients and the boxes
have no WMI installed. Another script reads all of the comp names from
AD into a txt file and then this script pulls it in for reading. That
much is working. I need to shutdown all of the clients at night, and
here is where I am stuck in the script process:


Const FOR_READING = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("D:\run\shut.txt", FOR_READING)
Set objShell = Wscript.CreateObject ("Wscript.Shell")
strComputers = objFile.ReadAll
objFile.Close
arrComputers = Split(strComputers, vbCrLf)
For Each strComputer In arrComputers
Wscript.Echo strComputer
objShell.Run "cmd /c shutdown -m \\strComputer -s -t 15 -c"
Next

The script will echo the strComputer, but how do I call that variable
into the quoted area for the shutdwon command? Is there another way to
do this, and keep in mind, there is no WMI on the clients, so the GET
winmgmts is a no go.

Thanks,
Scott

0 new messages