Forum Discussion
KevinA
16 years agoRetired GoTo Contributor
One2Many Script Repository
Welcome to the LogMeIn Central Script Repository!
What is it? A library of scripts to help you execute automated tasks and manage LogMeIn Pro² computers without having to access them manually.
How does it work? Simply browse the .txt files below, save as a .BAT file and head to your LogMeIn Central console. Then, navigate to the One2Many tab, and select "Run a batch file or executable." From there, simply upload the batch file and you're ready to go.
How can you help? We encourage you to share your own scripts and/or help review the scripts of others-- just "Kudo" your favorites or reply with your comments.
Use of these scripts is at your own risk so please test them on a small number of systems before deploying at scale. 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.
Remember: The currently running One2Many script ends when either the host service stops or the script includes computer shutdown or reboot tasks.
Script Repository
Microsoft Updates
Windows Update Javascript- The following script will perform comprehensive Windows Updates (Windows and Microsoft updates) on remote computers. This java script must be run as a Custom Task within One2Many with cscript being the entry point, Command to execute to update and install in the Custom Task is:
cscript.exe "%LMI_PACKAGEROOT%\wu.js" /sa /i
/sa will find updates that are flagged to be automatically selected by Windows Update. This is critical to avoid installing all available updates for the computer as this may include over ten 500Mb language support files on Vista and Win7. /i is the command argument that instructs the script to download and install the updates found. Additional arguments are outlined within the source code of the JavaScript.
Both the script and the command to execute can be customized to suite your environment’s needs.
Security
Disable Firewall- disable the Microsoft Windows Firewall for the appropriate version of Windows.
Enable Firewall- enable the Microsoft Windows Firewall for the appropriate version of Windows.
Install AVI Convert- install the LogMeIn Rescue AVI Converter which converts LogMeIn Rescue .rcec
recordings to .avi, for the appropriate version of Windows.
Update AVG Virus Definitions: Updates your AVG (versions 8 and/or 9) virus definition files
Maintenance
Purge DLL Cache- delete and restore the cache folder associated with Microsoft System File Checker for the appropriate version of Windows.
Reboot- reboot the remote device(s) with an end-user notification for the appropriate version of Windows. Remember: When a host is restarted, it disconnects from Central and the currently running One2Many script stops. Since One2Many cannot continue script execution, rebooting a device should be the last step of your One2Many script as it ends the script.
Shut down-shut down the remote device(s) immediately for the appropriate version of Windows. Remember: When a host is shut down, it disconnects from Central and the currently running One2Many script stops. Since One2Many cannot continue script execution, shutting down a device should be the last step of your One2Many script as it ends the script.
Reset System Restore- reset (disable/enable) Microsoft System Restore for the appropriate version of
windows.
Turn Off System Restore- disable Microsoft System Restore for the appropriate version of windows.
Turn On System Restore- enable Microsoft System Restore for the appropriate version of windows.
Defrag- Defragments C volume
Spool Cleaner- Cleans print spooler (submitted by iDevelop)
LogMeIn Update- Updates host software with the latest version of LogMeIn.
Use of these scripts is at your own risk so please test them on a small number of systems before deploying at scale. 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.
(edited and updated 2/23/23 by GlennD)
https://github.com/knix15/LogMeIn-One2Many-Community-Scripts/
Scripts can be found here as well for better future organization.
136 Replies
Replies have been turned off for this discussion
- hiran11 years agoActive Contributor
HI Guys
Thanks for the LogMeIn Update script. It worked flawlessly. When you are getting message to update it you can use this script. Worked with newest version - 6.1.0.6524
Many Thanks
Hiran
- MohanMenghwar11 years agoVisitor
Hi Guys,
I was wondering is there anyone who can share me the batch file to isntall logmein silently on multiple terminals.
Thanks,
Mohan
- Consultant6411 years agoRegular Contributor
You could try this:
Set objExplorer = CreateObject("InternetExplorer.Application")
With objExplorer
.Navigate "about:blank"
.ToolBar = 0
.StatusBar = 0
.Left = 100
.Top = 0
.Width = 635
.Height = 555
.Visible = 1
.Document.Title = "Service Complete"
.Document.Body.InnerHTML = _
"<img src='http://www.milnetech.com.au/images/remoteService.jpg' height=500 width=600>"
End With - Lisa_K811 years agoRetired GoTo ContributorMy fault woodlark! I apologize for the confusion - only the author of the original topic can see that button, not any of the people who reply!
- woodlark11 years agoActive Contributor
I dont see thee accept button..
- Lisa_K811 years agoRetired GoTo ContributorHi woodlark If DTConsulting solved your problem, please click the "Accept as Solution" button on his response. This helps other members find the answer quickly. Thanks!
Lisa Kate
Community Manager - woodlark11 years agoActive Contributor
Indeed it works!!! Awesome, and so simple.
- woodlark11 years agoActive Contributor
Wow this looks like it worked.. after scratching my head for 3 hours I came accross your post. I'll verify in about 20 minutes..
Thank you.
James.
- DTConsulting11 years agoNew Contributor
For those times when you want to make sure there is a Restore Point created before making changes to a PC.
First I created a VBS file with the code below. Then I run it using the 'Execute a remote command' like this:
IF EXIST C:\Clevespace\NameOfFile.vbs CSCRIPT C:\Clevespace\NameOfFile.vbs
Here is the code for the VBS file:
If WScript.Arguments.Count = 0 Then Set objShell = CreateObject("Shell.Application") objShell.ShellExecute "wscript.exe", Chr(34) & WScript.ScriptFullName & Chr(34) & " Run", , "runas", 1 Else GetObject("winmgmts:\\.\root\default:Systemrestore").CreateRestorePoint "Clevespace manually created this restore point before installing Windows Updates", 0, 100 End If - DTConsulting11 years agoNew Contributor
Here is something I put together to update MSE or Defender and then run a full scan and use SendEmail to email a log file. Most of the echo commands are for seeing the progress in the LMI logs. C:\Clevespace was the working directory where I keep the batch files and the SendEmail exe. I created a batch file and then called it using the 'Run a batch file or executable'. I also check for its existence before running the batch this way: IF EXIST C:\Clevespace\NameOfBatchFile.cmd C:\Clevespace\NameOfBatchFile.cmd
//Contents of Batch
@ECHO OFF ECHO( ECHO Running Anti-Virus scans. Do not close this window. ECHO Thank you, Clevespace ECHO( ECHO( ECHO Scanning process started for %COMPUTERNAME% ECHO( ECHO IF MSE not installed jump to end IF EXIST "%programfiles%\Microsoft Security Client\mpcmdrun.exe" ECHO MSE detected! IF EXIST "%programfiles%\Microsoft Security Client\mpcmdrun.exe" GOTO MSEscan IF EXIST "%programfiles%\Windows Defender\mpcmdrun.exe" ECHO Defender detected! IF EXIST "%programfiles%\Windows Defender\mpcmdrun.exe" GOTO DefenderScan GOTO NotInstalled :MSEscan ECHO( ECHO Run MSE Update and Scan ECHO( ECHO Updating MSE Signatures "%programfiles%\Microsoft Security Client\mpcmdrun.exe" -SignatureUpdate ECHO( ECHO Running MSE Full Scan: "%programfiles%\Microsoft Security Client\mpcmdrun.exe" -scan -scantype 2 ECHO( ECHO Copy MSE log file if it exists IF EXIST "C:\Users\AdminUSERNAMEHERE\AppData\Local\Temp\MPcmdRun.log" COPY "C:\Users\ADMINUSERNAMEHERE\AppData\Local\Temp\MPcmdRun.log" C:\Clevespace /y GOTO MSEemail :DefenderScan ECHO( ECHO Run Defender Update and Scan ECHO( ECHO Updating Defender Signatures "%programfiles%\Windows Defender\mpcmdrun.exe" -SignatureUpdate ECHO( ECHO Running Defender Full Scan "%programfiles%\Windows Defender\mpcmdrun.exe" -scan -scantype 2 ECHO( ECHO Copy Defender log file if it exists IF EXIST "C:\Users\ADMINUSERNAMEHERE\AppData\Local\Temp\MPcmdRun.log" COPY "C:\Users\ADMINUSERNAMEHERE\AppData\Local\Temp\MPcmdRun.log" C:\Clevespace /y GOTO Defenderemail :MSEemail ECHO( ECHO Email MSE log file if exists IF EXIST C:\Clevespace\MPcmdRun.log ( TYPE C:\Clevespace\MPcmdRun.log > C:\Clevespace\MPcmdRun.txt C:\Clevespace\sendemail -f FromEmail@Example.com -t SendToEmail@example.com -u MSE Scan results for: %COMPUTERNAME% -xu SMTPemail@example.com -xp PassWord -l C:\Clevespace\Email.log -o tls=yes -s smtp.EXAMPLE.com:587 -o message-file=C:\Clevespace\MPcmdRun.txt -a C:\Clevespace\MPcmdRun.log -q ECHO( ECHO MSE Log file sent on %DATE% at %TIME% from computer %COMPUTERNAME% ) ELSE ( C:\Clevespace\sendemail -f FromEmail@example.com -t SendToEmail@Example.com -u MSE Scan results for: %COMPUTERNAME% -xu SMTPemail@example.com -xp PassWord -l C:\Clevespace\Email.log -o tls=yes -s smtp.Example.com:587 -m MSE was run, but there is no log file. -q ECHO( ECHO MSE email with no log sent on %DATE% at %TIME% from computer %COMPUTERNAME% ) ECHO( ECHO End of scanning process EXIT :Defenderemail ECHO( ECHO Email Defender log file if exists IF EXIST C:\Clevespace\MPcmdRun.log ( TYPE C:\Clevespace\MPcmdRun.log > C:\Clevespace\MPcmdRun.txt C:\Clevespace\sendemail -f FromEmail@example.com -t SendToEmail@Example.com -u Defender Scan results for: %COMPUTERNAME% -xu SMTPemail@Example.com -xp PassWord -l C:\Clevespace\Email.log -o tls=yes -s smtp.Example.com:587 -o message-file=C:\Clevespace\MPcmdRun.txt -a C:\Clevespace\MPcmdRun.log -q ECHO( ECHO Defender Log file sent on %DATE% at %TIME% from computer %COMPUTERNAME% ) ELSE ( C:\Clevespace\sendemail -f FromEmail@Example.com -t SendToEmail@Example.com -u Defender Scan results for: %COMPUTERNAME% -xu SMTPemail@Example.com -xp PassWord -l C:\Clevespace\Email.log -o tls=yes -s smtp.Example.com:587 -m Defender was run, but there is no log file. -q ECHO( ECHO Defender email with no log sent on %DATE% at %TIME% from computer %COMPUTERNAME% ) ECHO( ECHO End of scanning process EXIT :NotInstalled ECHO( ECHO MSE or Defender are NOT Installed C:\Clevespace\sendemail -f FromEmail@Example.com -t SendToEmail@Example.com -u MSE OR DEFENDER NOT INSTALLED ON: %COMPUTERNAME% -xu SMTPemail@Example.com -xp PassWord -l C:\Clevespace\Email.log -o tls=yes -s smtp.Example.com:587 -m MS Security Essentials or Defender are not installed!!! -q ECHO( ECHO MSE Or Defender Not Installed and an email was sent on %DATE% at %TIME% from computer %COMPUTERNAME% ECHO( ECHO End of scanning process
//End of batch file