S
Sameh Ahmed
Hello there
I am working on my home windows XP Pro remotely, my problem now is that I
cannot restart or shut down the machine through the remote desktop
connection.
I tried a the below script and it gave me an error "Privilege not held"
I tried the command shutdown -r from the CMD and it said; a shutdown is in
progress.
any ideas?
Thanks in advance
Sameh
computertouse = "."
Set OpSysSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" &
computertouse & "").ExecQuery("select * from Win32_OperatingSystem where
Primary=true")
for Each objInstance in opsysset
'msgbox(objInstance.name)
objInstance.Win32ShutDown(4) '''''and also objInstance.Win32ShutDown(6)
next
msgbox("Script eneded")
I am working on my home windows XP Pro remotely, my problem now is that I
cannot restart or shut down the machine through the remote desktop
connection.
I tried a the below script and it gave me an error "Privilege not held"
I tried the command shutdown -r from the CMD and it said; a shutdown is in
progress.
any ideas?
Thanks in advance
Sameh
computertouse = "."
Set OpSysSet =
GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//" &
computertouse & "").ExecQuery("select * from Win32_OperatingSystem where
Primary=true")
for Each objInstance in opsysset
'msgbox(objInstance.name)
objInstance.Win32ShutDown(4) '''''and also objInstance.Win32ShutDown(6)
next
msgbox("Script eneded")