‎10-03-2009 12:09 AM
‎03-09-2010 03:37 PM
‎12-16-2009 01:25 PM
‎12-08-2009 08:28 AM
‎10-09-2009 01:08 PM
Opt("TrayIconHide", 1)
Global $MainSocket, $szIPADDRESS, $nPORT
Dim $szServerPC = @ComputerName
Dim $szIPADDRESS = TCPNameToIP($szServerPC)
Dim $ConnectedSocket = -1
Dim $nPORT = 5555
$MainSocket = TCPListen($szIPADDRESS, $nPORT)
If $MainSocket = -1 Then
Exit
EndIf
While 1
$ConnectedSocket = TCPAccept($MainSocket)
If $ConnectedSocket >= 0 Then
While 1
$recv = TCPRecv($ConnectedSocket, 2048)
If @error Then ExitLoop
Select
Case $recv = "yes"
MakeConnection()
Case $recv = "no" Or $recv = "timeout"
Exit
EndSelect
WEnd
EndIf
WEnd
Dim $msg, $recv
If $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)
Func OnAutoItStart()
TCPStartup()
EndFunc ;==>OnAutoItStart
Func OnAutoitExit()
TCPCloseSocket($ConnectedSocket)
TCPShutdown()
EndFunc ;==>OnAutoitExit
Func MakeConnection()
Run(@ScriptDir & "\lsremote.exe " & $cmdline[1], @ScriptDir)
Exit
EndFunc ;==>MakeConnection
Opt("TrayIconHide", 1)
TCPStartup()
Dim $szServerPC = $cmdline[1]
Dim $szIPADDRESS = TCPNameToIP($szServerPC)
ConsoleWrite($szIPADDRESS)
Dim $nPORT = 5555
Dim $ConnectedSocket = -1
$ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT)
If ProcessExists("explorer.exe") Then
If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(262180, "Remote Control", "Would you like Service Desk to take control of your machine?", 30) ;Timeout of 30s defined
Select
Case $iMsgBoxAnswer = 6 ;Yes
TCPSend($ConnectedSocket, "yes")
Exit
Case $iMsgBoxAnswer = 7 ;No
TCPSend($ConnectedSocket, "no")
Exit
Case $iMsgBoxAnswer = -1 ;Timeout
TCPSend($ConnectedSocket, "timeout")
Exit
EndSelect
Else
TCPSend($ConnectedSocket, "yes")
Exit
EndIf
Func OnAutoItStart()
TCPStartup()
EndFunc ;==>OnAutoItStart
Func OnAutoItExit()
TCPCloseSocket($ConnectedSocket)
TCPShutdown()
EndFunc ;==>OnAutoItExit
cmd /c \\server\share$\Lansweeper\psexec.exe \\{computer} -i -s -c -f \\server\share$\Lansweeper\lsremoteh.exe %computername%| \\server\share$\Lansweeper\lslocal.exe {computer}
‎10-08-2009 08:35 PM
‎10-08-2009 08:25 PM
‎10-07-2009 05:22 PM
‎10-07-2009 05:18 PM
nircmd.exe remote copy \\{computername} lockws
‎10-07-2009 05:01 AM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now