Skip to main content
GameDev.net gamedev.net
🔒 Locked

Remote reboot windowsxp

Started by encom Jan 27, 2006 at 7:10 AM 11 replies 1.5k views
Original Post
encom
encom
Hi, I have a windows xp network and a linux serveur. How from linux server to reboot windows stations ? thanks
Rattrap
Rattrap
I can't think of the name of the program in linux, but they do have a remote desktop client in linux that can connect to windows verisons that run terminal server/remote desktop. You can restart them that way. Else you might look for a program that can reboot the computer from a remote signal (wouldn't be that hard to program).
"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]
Charon
Charon
if i remember right the tool is called "tsclient".
really nifty to work with!
chaos, panic and disorder - my work here is finished
encom
encom
I did not found a program that reboot xp on linux
encom
encom
do u realy think tsclient can remotely reboot windows (with command line)
Rattrap
Rattrap
Well you would have to actively access the remote desktop and then issue the reboot command. In XP you can click on the Windows Security button on the taskbar (which appears in remote desktop mode), or use taskmgr and choose reboot. I'm looking at a remote connected computer right now. I reboot them all the time. I know its possible.

And as far as a program, just write your own. Look up on creating service programs. Then lookup using Winsock2 for networking. And then you want how to get the security permissions to reboot the computer. All of this is avaialble in the MSDN library. Then you would just need to write a small linux program which uses berkeley sockets to send a message to the windows machine to reboot.
"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]
encom
encom
hehe, i have done it. I have a service on NT to reboot the PC, BUT it doesnt work (i add the privilege to reboot). When nobody is loged, the reboot doesnt work (Error : device is not ready). That's why im searching a program.
dave
dave
If this is a one-installation situation where you want it to work with just two specific machines, then just write a small windows service that listens on a certain port and waits for a certain packet, or something.

I could write one in a couple hours, fairly simple.

Dave
dave
dave
Oh and delete the other topic.
encom
encom
Hmmmmm

My winservice do that. But the InitiateSystemShutdown function doesnt work when nobody is logged !!!!!
Rattrap
Rattrap
You might also try the ExitWindowsEx.

And I don't know what to tell you about the InitiateSystemShutdown function. I have written apps to restart the computer, but I haven't ever written one as a service.
"I can't believe I'm defending logic to a turing machine." - Kent Woolworth [Other Space]
Charon
Charon
really weird way ( ;-) ) to do it :

1. install wine
2. get "psshutdown"
3. start psshutdown with something like "wine psshutdown \\your_computer -u youruser -p hispassword -r"
where "youruser" has to be a user on the pc you want to reboot and "-r" means "reboot the pc"

since i don't use this tool often i am not completely sure if this might work ^^
chaos, panic and disorder - my work here is finished
MrEvil
MrEvil
A “cool” way to do this would be with WMI, that should probably be the preferable method. WMI is an implementation of a technology called WBEM, which is available in opensource packages such as OpenWBEM.

It'd be a lot of work, I suppose, but learning new things is fun, isn't it? Although it's far more fun to manipulate WMI objects in &#106avascript than in VB, C++ or C# etc.<br>

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.