Hello!

I am trying to run a vbscript that performs a reboot on a windows 2003
server.
This script has worked well in windows 2000, but now it quits with
complaints about rights.

=================================
The script:
Dim oShutdown, oOPSys
Set oShutdown =
GetObject("winmgmts:{impersonationlevel=impersonate,(RemoteShutdown)}\\192.1
68.25.254").Execquery("Select * From win32_operatingsystem")


For Each oOPsys In oShutdown
oOPsys.win32shutdown(2+4)
Next
=================================

Do i have to make some other system call to perform a reboot on
a windows 2003 server?

Thanks for listening...

Br,
Christian O.
chot@home.se

vb scripting on win 2003? by Vincent

Vincent
Wed Sep 17 10:46:19 CDT 2003

Make sure WSH is installed, had the same issue on a test
box.
If you did not install it drill down to "Windows" > "inf"
(hidden folder) > wsh.inf
Right click and choose install.

This should do the trick

Good luck.

Vince S.
>-----Original Message-----
>Hello!
>
>I am trying to run a vbscript that performs a reboot on
a windows 2003
>server.
>This script has worked well in windows 2000, but now it
quits with
>complaints about rights.
>
>=================================
>The script:
>Dim oShutdown, oOPSys
>Set oShutdown =
>GetObject("winmgmts:{impersonationlevel=impersonate,
(RemoteShutdown)}\\192.1
>68.25.254").Execquery("Select * From
win32_operatingsystem")
>
>
>For Each oOPsys In oShutdown
> oOPsys.win32shutdown(2+4)
>Next
>=================================
>
>Do i have to make some other system call to perform a
reboot on
>a windows 2003 server?
>
>Thanks for listening...
>
>Br,
>Christian O.
>chot@home.se
>
>
>.
>