GrahamT Posted March 20, 2006 Share Posted March 20, 2006 (edited) I'm writing a utility to control the computers in a Student lab at my school - to be able to do things like shutdown/logoff/reboot all the workstations from the teacher's computer, I have a function which uses "TCPConnect" to connect to logged-in workstations. Func SetupConnections() ProgressOn("TCP/IP Connection Progress", "Attempting Connections:", "Workstation") For $station = 1 to $numStation $state = "Connected" $i = 100/$numStation * $station $IPAddress = "192.168.15." & $station $connectedSocket[$station] = TCPConnect($IPAddress, $portAddress) If @error Or $connectedSocket[$station] < 1 Then $state = "Failed" ProgressSet( $i, "Workstation " & $station & " (" & $IPAddress & ") : " & $state) Next sleep(500) ProgressSet(100 , "Done", "Complete") sleep(1000) ProgressOff() EndFunc 1 I want to run a client program on the workstations, so that the workstation is "listening" for a connection, even if nobody is logged in at the workstation. Is this possible? Can I run my client program as a Windows Service? 2 At the moment, if a workstation is not logged in, the function takes less than a second to bring up the "failed" message. However, if a workstation is actually switched off, it takes up to ten seconds before it times out and shows the "failed" message. Is there any way of speeding this up. Thanks, Graham New International School of Thailand Edited March 20, 2006 by GrahamT Link to comment Share on other sites More sharing options...
nfwu Posted March 20, 2006 Share Posted March 20, 2006 (edited) I think services are your answer:Here are links discussions on services:http://www.autoitscript.com/forum/index.php?showtopic=11682http://www.autoitscript.com/forum/index.php?showtopic=3702Best topic I've found so far: http://www.autoitscript.com/forum/index.ph...288entry97288#) Edited March 20, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
blindwig Posted March 20, 2006 Share Posted March 20, 2006 I'm writing a utility to control the computers in a Student lab at my school - to be able to do things like shutdown/logoff/reboot all the workstations from the teacher's computer,I think you can get all this funcitonality out of the shutdown.exe tool from the Windows resource kit. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
rbhkamal Posted March 20, 2006 Share Posted March 20, 2006 Maybe Ping will help you out. Try to ping each IP before opening a socket , you can control the timeout for Ping. This is also good for ARP. "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now