Results 1 to 12 of 12

Thread: Shutdown 20 Clients over Win98 Network

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    51

    Lightbulb

    its a very difficult Problem...
    I hope that anybody can help me!
    How can i shutdown one ,or all, Clients on a Network?
    I have create a form..on this u can choose how many clients shutdown (select over checkboxes)...f.ex. i select checkbox 1 to 10 and press a command button, the programm should send over winsock the exitwindows code to each of the selected Clients!
    I´ve tried this over 2 weeks..without a success..

    Is there anybody outa there who can help me? i hope so...


    cya

  2. #2
    Guest
    I would also like to know if this can be done. If so - please let me know. Either by this message baord or my email [email protected]

    Thanks

  3. #3
    Addicted Member
    Join Date
    Aug 2000
    Location
    Columbus Ohio
    Posts
    217

    Exclamation Don't know your age

    But it either sounds like you are a network admin or a student at a school with a win98 network
    Chris

    [email protected]
    Windows XP RC2 B2526
    Visual Studio.Net Beta 2
    C++, VB, VB.Net, ASP, PHP

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    51

    Yes that is possible

    I have it!!!!
    Wouhhh... work for 2 weeks..:-
    the selectet Clients will shutdown, restart or logoff user ..
    But i have only i runtime erorr 142..Hmmmm no idea what this should be!!

    but it is really possible to control more than 20 clients in a network

  5. #5
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    but it is really possible to control more than 20 clients in a network
    Everything is possible.

    But i have only i runtime erorr 142..Hmmmm no idea what this should be!!
    When is this happening?
    "Application-defined or object-defined error"

    hmm... what's you doing man?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  6. #6

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    51

    Runtime Error

    Ok....I´ve selectet 3 clients per checkbox - Shutdown.
    if i press the command button to procced the Shutdown sequence the clients shutting down and in the same moment a Runtime error Box appears 142!!!

    Im able to shutting down but the program will close automaticly...
    This is my problem!

  7. #7
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I don't get you, on wich computer does the error appear? on the 'host' or the clients?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  8. #8

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    51

    Runtime Error

    I appears on the Host..
    BY the way..what is Runtime error 126?

  9. #9

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    51

    ??

    can i declare: Winsock1.SendData "reboot" for a reboot on a client and : Winsock1.SendData "shutdown" to shutdown
    if the client programm is coded:
    Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
    Option Explicit
    Const EWX_LOGOFF = 0
    Const EWX_SHUTDOWN = 1
    Const EWX_REBOOT = 2
    Private Sub Form_Load()
    Winsock1.RemoteHost = "195.96.55.169"
    Winsock1.LocalPort = 1001
    Winsock1.RemotePort = 1002
    Winsock1.Bind
    End Sub
    Private Sub Winsock1_DataArrival(ByVal bytes As Long)
    Dim comm As String
    Winsock1.GetData comm
    If comm = "reboot" Then ExitWindowsEx EWX_REBOOT, 2
    If comm = "shutdown" Then ExitWindowsEx EWX_SHUTDOWN, 1
    If comm = "Logoff" Then ExitWindowsEx EWX_LOGOFF, 0
    End Sub

  10. #10
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    hmmm sorry but how can I smell wich line is giving the error then? and you say the error is at the 'host' machine?

    and by the way, use [code]code here[/code] to color your code, and in general, it's a good habit to Indent and Outdent your code.

    Code:
    Private Sub MySub()
    If a = b Then
        If b = c Then
            'Commenting is a good habit too!
            Dothings
        Else
            DoOtherThings
        End If
    DoNothing
    Else
    DoOtherThings
    End If
    End Sub
    This will make your code a lot clearer (especially what's between an If Then and what not.
    Also Comment things to help yourself at debugging and looking up code, and for others to help them understand your code (the comments aren't compiled into the exe so don't worry about the exe size and sensitive information)

    Jop's editing his post now
    wow I just saw that this is my first post without any smiley!



    [Edited by Jop on 10-02-2000 at 12:35 PM]
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  11. #11

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    51

    Runtime Error 126

    MY form works in Debug mode but after compiling i get an
    Runtime Error 126! What is this???

  12. #12
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Man, I'm not able to help you in any if you don't give me a decent discription of where the error occurs or what you're doing, not even what form!
    Please make yourself clear otherwise I can't help you!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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