cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mrmcfu
Engaged Sweeper
Hello -

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
11 REPLIES 11
Anonymous
Not applicable
Thanks for sharing, I was using my own script http://www.lansweeper.com/forum/yaf_postst343_Another-Remote-VNC-according-to-my-needs.aspx

now I'm considering to use lsremote the same way as you. Still when I have the time I will try to upgrade my script so it's possible to make secure connections - for now I don't have the time.

Regards,
Paulo
mrmcfu
Engaged Sweeper
Alright well I just took care of this myself.

First I created two .vbs scripts and put them in my tools folder.

We'll call the first script "remote.vbs" and it is written below:

---------------------------------------------

On error resume next

compstr = wscript.arguments(0)
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFilePath = "\\LANSWEEPERSERVER\tools$\Remote_Client.vbs"
strDestination = "\\" & compstr & "\c$\"
Set objFileCopy = objFSO.GetFile(strFilePath)

objFileCopy.Copy(strDestination)

set WshShell = WScript.CreateObject("WScript.Shell")
return = WshShell.Run("%comspec% /c \\LANSWEEPERSERVER\tools$\psexec.exe \\" & compstr & " -i wscript.exe c:\remote_Client.vbs",0,True)

Set objFileDel = objFSO.GetFile("\\" & compstr & "\c$\remote_client.vbs")
objFileDel.Delete

If return = 1 Then
WshShell.Run("\\LANSWEEPERSERVER\tools$\lsremote.exe " & compstr & ""),0,True
End If

----------------------------------------------

This script is run like a normal custom action with the computer name following the script in the configuration.

When it's run, a second script (remote_client.vbs) is copied to the client's c:\ drive and run using psexec. The second script is shown below:

----------------------------------------------

On error resume next

intAnswer = Msgbox("Would you like Service Desk to take control of your machine?",vbYesNo, "Remote Control")

If intAnswer = vbYes Then
wscript.quit(1 Mod 255)
Else
wscript.quit(3 Mod 255)
End If

----------------------------------------------

This script asks the user to accept the connection or not, then exits with an exit code, which the first script records and acts upon in determing whether to launch lsremote.exe or not.

I hope someone finds this useful