TheTechGuide Forum
General Category => Software => Topic started by: Guest_Zentinel on April 29, 2003, 12:47:47 PM
-
hi guys!!
i was wondering if there's a possibility to restart/shutdown/logoff/suspend a windows2000 machine from the commandline. I remember this possibility was integrated in Windows98 where you had to pass some cmds to the rundll32 i suppose...
thx for yer help!!
c ya
Zentinel
-
Try this out:
http://msdn.microsoft.com/library/default....itwindowsex.asp (http://\"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/exitwindowsex.asp\")
-
[quote name=\'Tracky110XP\' date=\'Apr 29 2003, 05:54 PM\']Try this out:
http://msdn.microsoft.com/library/default....itwindowsex.asp (http://\"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/exitwindowsex.asp\")[/quote]
rundll and rundll32 are usefull for this sort of thing. Look up their usuage on google
-
Here's a page with a list of that very topic and the similar...
there is actually more ways than this though because the one
i cant remember exactly i used to use for 2k is not on there.
i would know it if i see it though.
NOTE:...if you find the rundll command that can open or close
a cdrom based on it's current open/close status swing it back to me.
I found it once...but thought it was useless at the time. It did work
but i never found the link to that obscure page again.
As far as .asp goes you could do it that way...could do alot of other
things aswell with that. Should look into that if you have a chance.
I just dont like it because not all environments are built the same to
run .asp the same way...vs. rundll and the like.
-
o wait...i dont know if you need the url or not :/ (im tired)
http://www.robvanderwoude.com/shutdown.html (http://\"http://www.robvanderwoude.com/shutdown.html\")
-
TO RESTART YOU CAN TYPE :
C:\WINDOWS\RUNDLL.EXE user.exe,exitwindowsexec
YOU CAN CREATE A SHORCUT AND ON THE TARGET WRITE THAT PATH.
TO SHUT DOWN TYPE:
C:\WINDOWS\RUNDLL.EXE user.exe,exitwindows
YOU CAN CREATE A SHORCUT AS ABOVE
-
shutdown -r
Works with XP
But with win 2k and below, I believe you need shutdown.exe.