Is it possible to create a program that would run on a server and that you could select, maybe in a listbox, another server name and restart it?
Printable View
Is it possible to create a program that would run on a server and that you could select, maybe in a listbox, another server name and restart it?
yes, you just need a client, a server and a connection between the both! for this, you need the IP or the hostname of the server. you have to connect the server with the client and send a command which makes the server shutdown the computer.
for example put a tcp/udp control, a button, and a textbox on a form.
this may act as the client.
for the server, you need a form with a tcp/udp control. in the eventhandler for data arrival of the tcp/udp control, you should specify e.g. a string as the shutdown command.
Now run the server on the computer you want to shut down, run the client on another computer (both must be in a network or must be connected to the internet) and send the command to shutdown to the server (server's IP should be written in the textbox).
You can use ExitWindowsEx EWX_SHUTDOWN for shutting down.
See what happens ;)
------------------
Razzle
ICQ#: 31429438
What command/code would I use for restarting a server? you have...
ExitWindowsEx EWX_SHUTDOWN...
would it be...
RestartWindowsEx EWX_RESTART
no, it's ExitWindowsEx EWX_REBOOT
if you want, I can send you a sample program
:)
------------------
Razzle
ICQ#: 31429438
That would help out tremendously ;)
ok, wait a minute
I'll try to keep it clearly arranged, so I gonna leave out too confusing features
------------------
Razzle
ICQ#: 31429438
Okay :)
ok, I sent it to your email address!
I hope it works :)
I've put both forms in one project, if you want to use the client seperated from the server just import one of the forms into another project and delete it from the old.
------------------
Razzle
ICQ#: 31429438
I appreciate. I will have to go home to download the program, I'm at work and can't get to the hotmail site from here. Thanks again :)
no problem ;)
------------------
Razzle
ICQ#: 31429438
Hey Razzle, I sent you an email, about some questions, let me know if you need more clarity...
and there's my answer :D
------------------
Razzle
ICQ#: 31429438