
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2009 12:09 AM
Is there some kind of way to generate a popup or confirmation on the user's desktop when the lsremote tool is invoked? Our Service Desk is extremely nervous about using this feature without user confirmation.
Best,
MrMcFu
- Labels:
-
Custom Actions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2010 03:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2009 01:25 PM
Case $recv = "yes"
Msgbox(0,"Answear", "The user accepted connection")
MakeConnection()
Case $recv = "no" Or $recv = "timeout"
Msgbox(0,"Answear", "The user did not accepted connection")
Exit
But I find this quite annoying!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2009 08:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2009 01:08 PM
lslocal.au3:
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
lsremoteh.au3:
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
The action should be:
cmd /c \\server\share$\Lansweeper\psexec.exe \\{computer} -i -s -c -f \\server\share$\Lansweeper\lsremoteh.exe %computername%| \\server\share$\Lansweeper\lslocal.exe {computer}
lsremote.exe should be on the same share as lsremoteh.exe and lslocal.exe

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2009 08:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2009 08:25 PM
I can post the autoit code if it fits your needs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2009 05:22 PM
First script -
-------------------------------------------
On error resume next
compstr = wscript.arguments(0)
verify = MsgBox("Please confirm you wish to lock the desktop of " & compstr,vbYesNo, "Lock Computer")
If verify = vbNo Then
wscript.quit
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFilePath = "\\LANSWEEPERSERVERSHARE\remote_lock.vbs"
strDestination = "\\" & compstr & "\c$\"
Set objFileCopy = objFSO.GetFile(strFilePath)
objFileCopy.Copy(strDestination)
set WshShell = WScript.CreateObject("WScript.Shell")
return = WshShell.Run("%comspec% /c \\LANSWEEPERSERVERSHARE\psexec.exe \\" & compstr & " -i wscript.exe c:\remote_lock.vbs",0,True)
Set objFileDel = objFSO.GetFile("\\" & compstr & "\c$\remote_lock.vbs")
objFileDel.Delete
------------------------------------
Second Script:
----------------------------------------
On Error Resume Next
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"
------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2009 05:18 PM
nircmd.exe remote copy \\{computername} lockws
but if you use psexec you can lock it right away...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2009 05:01 AM
I just finished another similiar script that locks the workstation remotely and I'll post it tomorrow.
