Welcome to the new LogMeIn Community. One of the things that we would like to foster is the sharing of lots of great ideas and neat tips and tricks. I thought that I would get the ball rolling by publishing the LogMeIn Rescue Scripts that I use on a day to day basis, when I’m doing product demonstrations. These are fairly basic, but hopefully it will get everyone thinking of how powerful this feature can be. Scripts are a great way to automate repetitive, mundane or pain in the neck tasks.
I have provided a few scripts which perform individual tasks but I have worked with a lot of users who combine multiple tasks into a single script. So when you are providing remote support and it is your standard operating procedure to perform tasks A,B,C and D for troubleshooting or diagnostic purposes, then chances are, you can automate those tasks with LogMeIn Rescue scripting.
Haven’t had the opportunity to dabble with scripts in Rescue yet? No problem, below are step by step instructions on how to get scripts set up in your Technician Console. Additional instructions can be found in the LogMeIn Rescue Technician Console Users Guide, in the section named "Working with Scripts"
1. Create a folder named LogMeIn_Rescue_Scripts anywhere on your C: drive (best in a location that won’t be moved) and put the XML file in there.
2. Within the LogMeIn_Rescue_Scripts create six individual folders named:
Normally step 2 is not required in the real world, but the software we use for the community only allows me to upload individual files, not folders.
3. Copy the scripts (below) into the corresponding folder which you created in step 2.
4. Open up the Technician Console, click on “options” (upper left corner) then select “Edit Scripts.”
5. Click the “Import” button then browse to the LogMeIn_Rescue_Scripts folder and point to the XML Document and this will import the scripts.
Once your scripts have been imported you will notice that you have the option to run a given script when the customer applet starts after you have connected to a remote computer. You can also change the order in which the scripts appear in your Technician Console, so you can move frequently used scripts towards the top, and lesser used scripts to the bottom.
Do you have a great script that you use and think will be useful to others? If so, email it along with a brief explanation to rescuescripts*at*logmein*dot*com and I will post them to the community. If you do send me some examples please let me know if you would like to make an anonymous contribution or if it’s OK that I can use your name and/or LogMeIn community login name.
Script Links: (Right click, select "save link as" then change the file extension from.txt to .cmd)
http://community.logmein.com/html/assets/defrag info Cdrive.cmd
Use of these scripts are at your own risk. The scripts are provided “as is” without any warranty of any kind and LogMeIn disclaims any and all liability regarding any use of the scripts. Please see the following Terms and Conditions for more information.
Where can i learn how to build my own scripts?
Great question. Technician Console scripts can be written in and deployed using any language the operating system can execute. For example a script can be written in a batch file using Visual Basic, or it can be a software package.
Some of the examples I provided are probably about as simple as you can get. All I did is use the command you would use at the C prompt and paste it into Notepad and saved it with a ".cmd" extension.
Perhaps a good place to start is using basic commands. Try Googling "command prompt cheat sheet" and that should get you started.
Does anyone have any resources for scripting which they have found useful?
I use this to see if the clients ISP is blocking port 25 (smtp traffic). You will have to change SMTPSERVER.COM to a server you know accepts SMTP traffic. You will also need to remove the space after the @ symbol and try to use a known account. Either way it probably won't finish, but as long as you receive something other than this "Connecting To SMTPSERVER.COM...Could not open connection to the host, on port 25: Connect failed" back it is probably open.
rem - Port 25 Test -
echo Testing Port 25:
telnet SMTPSERVER.COM 25
MAIL FROM: TEST@ SMTPSERVER.COM
RCPT TO: TESTER@ SMTPSERVER.COM
This is a test message you will not see a response from this command.
I've included below some links to some of the best sites I've come across for scripting purposes.
www.ss64.com - if you're looking for the syntax you need to get your script going. (has some examples)
www.robvanderwoude.com - probably one of the best scripting sites with examples.
Also, we usually have a folder on most PCs we support with various Sysinternal tools, so when we need to run scripts we can also use those. There are online version of the tools now but we haven't really adjusted our scripts to use those versions.
With your and the rest of the community's help I hope we can make a really good collection of scripts available.
Here’s a few more scripts that might be useful, but first I’d to thank my colleague, Csaba Jaromi, my counterpart in our Amsterdam office who put these together.
The new scripts are:
• Display BOOT.INI contents (XP)
• Display BOOT.INI contents (Vista)
• Display current user Proxy settings (XP)
• Display current user Proxy settings (Vista)
• Get HOSTS file contents
• Power profiles available and currently active profile details
• Detailed scheduled task information
Of this new batch, I think the power profile is my favorite, it returns results that look like this:
Field Description Value
Name Home/Office Desk
Numerical ID 0
Turn off monitor (AC) After 20 mins
Turn off monitor (DC) After 5 mins
Turn off hard disks (AC) Never
Turn off hard disks (DC) After 10 mins
System standby (AC) Never
System standby (DC) After 5 mins
System hibernates (AC) Never
System hibernates (DC) After 20 mins
Processor Throttle (AC) Not Supported
Processor Throttle (DC) Not Supported
With all the emphasis on being green, this is a great tool to help the tech community to do their part.
To download and use these scripts in your Rescue Tech Console:
Create the following folders in your Logmein_Rescue_Scripts folder. Keeping the syntax the same as below is important because that’s what the XML file will be looking for (once the scripts are installed in your Technician Console then you can change the file and folder names as well as the descriptions).
Boot Settings for Vista
Next, put the attached files in their corresponding folder and the the XML file in your Logmein_Rescue_Scripts folder.
Now, open up your Technicians Console and click on the “Options” menu (upper left) and select “Edit Scripts” and in the lower left hand corner select “Import” then browse to your Logmein_Rescue_Scripts folder and select the “New Scripts 09.XML” file, then click on the “Open” button. This should import all of the new scripts. Click the “Close” button in the lower left corner of the Technician Console and you should be all set.
Please note that the disclaimer in the initial post of this thread apply to these scripts as well.
How do you get this to work? I've been trying for along time to get windows' built-in telnet to do this. Telnet takes all input from interactive input (except for user/pwd for telnet links). Trying to run batch files like this halt once the telnet program runs. Trying to redirect input via "<" doesn't go either, nor does using "|".
echo telnetdata | telnet ip port
I've heard people point to expect (http://expect.nist.gov) as the solution to doing batc mode telnet control. Typically in my experience you could reduce your batch file to just the telnet line to determine if the port is open or not. Although this
would not account for a filtering proxy or some such other stand in device. All you'll know is if the port is open or not, and not wether you can actually pass email traffic through it.
To debug VBS scripts interactively, like Visual Basic code debugging, I looked for and found SplineTech VBS Debugger. http://www.remotedebugger.com/ also appears to have a Java and ASP remote versions. ~ $80 for a personal version. Saved me tons of time.