Results 1 to 12 of 12

Thread: Remote shutdown???

  1. #1
    Guest

    Post

    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?

  2. #2
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    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

  3. #3
    Guest

    Post

    What command/code would I use for restarting a server? you have...

    ExitWindowsEx EWX_SHUTDOWN...

    would it be...

    RestartWindowsEx EWX_RESTART

  4. #4
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    no, it's ExitWindowsEx EWX_REBOOT

    if you want, I can send you a sample program



    ------------------
    Razzle
    ICQ#: 31429438

  5. #5
    Guest

    Post

    That would help out tremendously

  6. #6
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    ok, wait a minute
    I'll try to keep it clearly arranged, so I gonna leave out too confusing features

    ------------------
    Razzle
    ICQ#: 31429438

  7. #7
    Guest

    Post

    Okay

  8. #8
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    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

  9. #9
    Guest

    Post

    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

  10. #10
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    no problem

    ------------------
    Razzle
    ICQ#: 31429438

  11. #11
    Guest

    Post

    Hey Razzle, I sent you an email, about some questions, let me know if you need more clarity...

  12. #12
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    and there's my answer

    ------------------
    Razzle
    ICQ#: 31429438

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width