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
- MarioAguadoFdz12 years agoActive Contributor
Hello regarding how to Force the LMI Host to be updated on demand, I has been asking for that to Logmein Support since more that 2 years ago, but nothing.
Under Central should bea predefined task or a way to Trigger the Logmein Host update On-Demand for one or many Hosts at the same time, becuase I notice that not all our Host are udpated and we have 3723 Hosts:
- LogMeIn Host Software Versions
Number of Host --> Software Version1--> 25042--> 26511--> 26948--> 32688--> 34305--> 388813--> 41322--> 414412--> 43069--> 438024--> 44002123--> 4408200--> 4634878--> 4652717--> 4670 - Taomyn12 years agoActive ContributorAny chance of an updated script to update the LMI client? Apart from being badly written (goto's and even worse duplicate labels), it doesn't work - all it does is re-run the last downloaded update file which of course is what is already running. If anyone knows how to kick off the update check and download, I'll happily add it to my amended script and share it here.
- cmjones082212 years agoNew Contributor
Does anyone have a script that removes Shut Down from Start Menu but keep Restart? www.sevenforums.com/tutorials/148605-shut-down-restart-sleep-hibernate-commands-add-remove.html
- marcjfernandez12 years agoVisitor
Hi there...
I am new to this script aspect and we want to use OneToMany to install a software. But the software uses prompts or "wizard" to install. i.e click Next a few times etc... Does anybody know how I can write a script to "mimic" a person actually doing these steps?
Any help would be appreciated.
- tarcis12 years agoActive Contributor
Here is a script to clean the temp folder
@echo off
cd %temp%
rd . /q /s
- TempLogin12312 years agoNew Contributor
Hi all
Posted in Central forum as well but thought I better had try here as well..
Need to pull back around 10 XMLs from different locations on remote PC and transfer back to my (approx 500 PC's in Estate) - I can create a batch file will pulls all the XMLs into one location if required but how to a get that zip file back to my PC?
- rcolbert197112 years agoNew Member
Not sure of your set up however if you set up WSUS on the server and then make a GPO for the machines to look to that server for updates, its just a matter of approving the updates and the machines pulling them down.
GPO is the best method by far,
- StrobeTech13 years agoVisitor
Hi Everyone,
Starting to use One2Many more and more for automated tasks but found that the restart command a little limited especially if you manage multiple version of Windows.
Here is an updated version that might be of interest: -
@echo off rem ===================================================================================================== rem = Company: Strobe Technologies Ltd T/a Strobe IT rem = Author: Robin Toy rem = Version: v 1.2 rem = Date: 25/01/2014 rem ====================================================================================================== rem = Description: rem = LogMeIn One2Many Windows Reboot Script rem = rem = This script detects the version of Windows that it is being run on and executes rem = the correct shutdown command to perform a restart of that computer rem ===================================================================================================== rem -------------------------------------------------------------------------------------------------------------------- rem - General Start Script rem ---------------------- rem Setlocal echo Restart Script Starting date /T time /T echo. :: Get windows Version numbers for /f "tokens=2 delims=[]" %%G in ('ver') do (set _version=%%G) for /f "tokens=2,3,4 delims=. " %%G in ('echo %_version%') Do (set _major=%%G& set _minor=%%H& set _build=%%I) echo Major version: %_major% Minor Version: %_minor%.%_build% if "%_major%"=="5" goto sub5 if "%_major%"=="6" goto sub6 echo Unsupported Windows OS version Detected echo. goto exit rem -------------------------------------------------------------------------------------------------------------------- rem -------------------------------------------------------------------------------------------------------------------- rem - Windows Major Version 5 rem ------------------------- :sub5 ::Win XP or 2003 if "%_minor%"=="2" goto sub5_2 echo Windows XP [%PROCESSOR_ARCHITECTURE%] echo. echo Restarting Computer in 10 seconds shutdown /r /f /c "Strobe IT Scheduled Reboot" /t 10 goto exit :sub5_2 echo Windows 2003 or XP 64 bit [%PROCESSOR_ARCHITECTURE%] echo. echo Restarting Computer in 10 seconds shutdown /r /f /c "Strobe IT Scheduled Reboot" /t 10 goto exit rem -------------------------------------------------------------------------------------------------------------------- rem -------------------------------------------------------------------------------------------------------------------- rem - Windows Major Version 6 rem ------------------------- :sub6 if "%_minor%"=="1" goto sub6_1 if "%_minor%"=="2" goto sub6_2 if "%_minor%"=="3" goto sub6_3 echo Windows Vista or Windows 2008 [%PROCESSOR_ARCHITECTURE%] echo. echo Restarting Computer in 10 seconds shutdown /r /f /c "Strobe IT Scheduled Reboot" /t 10 /d P:0:0 goto exit :sub6_1 echo Windows 7 or Windows 2008 R2 [%PROCESSOR_ARCHITECTURE%] echo. echo Restarting Computer in 10 seconds shutdown /r /f /c "Strobe IT Scheduled Reboot" /t 10 /d P:0:0 goto exit :sub6_2 echo Windows 8 or Windows 2012 [%PROCESSOR_ARCHITECTURE%] echo. echo Restarting Computer in 10 seconds shutdown /r /f /c "Strobe IT Scheduled Reboot" /t 10 /d P:0:0 goto exit :sub6_3 echo Windows 8.1 [%PROCESSOR_ARCHITECTURE%] echo. echo Restarting Computer in 10 seconds shutdown /r /f /c "Strobe IT Scheduled Reboot" /t 10 /d P:0:0 goto exit rem -------------------------------------------------------------------------------------------------------------------- rem -------------------------------------------------------------------------------------------------------------------- rem - Windows Major Version 7 rem ------------------------- rem N/A rem -------------------------------------------------------------------------------------------------------------------- rem -------------------------------------------------------------------------------------------------------------------- rem - General Finish Script rem ----------------------- :exit echo Restart Script Finished date /T time /T rem exit rem --------------------------------------------------------------------------------------------------------------------Thanks
Robin
- j_helland13 years agoActive Contributor
I've got a few goodies that I thought I'd share seeing as nobody has posted to this topic in a while.
Important to note is that One2Many is MOST powerful in my opinion, when the "custom" task type is used. By using this type of task, you can copy files and run scripts in one step vs using one task to "deploy scripts" and another task to run batch files or executables.
Also important to note is that, using the "custom" task, there is only ONE LINE given to execute DOS commands. You CAN execute multiple DOS commands on one line by using the "&&" command to separate the commands.
For Example. . . this command would copy files that you've uploaded to a specified location(s) on the target computer.
copy filename.txt "c:\users\userABC\documents"&© picture.jpeg "c:\users\userABC\pictures"
______________________________________________________________
Sleep&Wake @ 6:00: Puts the computer to sleep @ 6:00pm and wakes the computer up @ 6:00am. I use this because some of my computers have usb devices attached which don't allow them to sleep.
Prerequisites: This script uses 2 different .xml files which I've exported from windows tasks in the task manager (windows7). I use the "custom" task, upload the xml files, then run this command in the "command to execute" field.
copy wakeat6.xml "c:\vrad software\scripts"&© sleepat6.xml "c:\vrad software\scripts"&&schtasks /create /tn Sleep_at_6 /xml "c:\vrad software\scripts\sleepat6.xml"&&schtasks /create /tn Wake_at_6 /xml "c:\vrad software\scripts\wakeat6.xml"
______________________________________________________________
Install SpiceWorks: Installs Spiceworks. I have about 500 LogMeIn clients in the cloud....so I need Spiceworks to manage my inventory. Spiceworks has an "agent" which reports intricate computer hardware and software details back to my central server. I can monitor the server and determine computer depreciation, OS upgrade status as well as trigger alerts if malicious software is installed, or if the computer is low on resources. Spiceworks is free of charge.
Prerequisites: You'll need to set up your own SpiceWorks server and your LMI clients will need to be able to talk to it's IP address and specific port (of your choosing). If you're on a LAN, there is a LANscan option available. After setup, you'll fill in the variables within the installer script to specify IP, Port and authentication key.
msiexec.exe /x "Spiceworks Agent.msi" ALLUSERS=1 /q /norestart&&msiexec.exe /i "spiceworks agent.msi" SPICEWORKS_SERVER="server/ip" SPICEWORKS_AUTH_KEY="unique_key" SPICEWORKS_PORT=port/q /noresta
______________________________________________________________
Check Download Speed: Checks the download speed/bandwidth on the target computer.
Prerequisites: Just paste the text below into a .vbs script called speedtest.vbs, upload the script into the "custom" task type, then run the command cmd /c cscript speedtest.vbs. After you run the task, check the log file in LMI, it should show you the speed in kilobytes.
Script: (Paste into notepad, save as speedtest.vbs)
strSource= "http://networking.us.uu.net/customer_support/pal/pal_4/newf1.zip"
strDest = "c:\newf1.zip"
StartTime = Timer
set HTTP = WScript.CreateObject("Microsoft.XMLHTTP")
HTTP.open "GET", strSource, False
Set filesys = CreateObject("Scripting.FileSystemObject")
set Stream = createobject("adodb.stream")
Const adTypeBinary = 1
Const adSaveCreateNotExist = 1
Const adSaveCreateOverWrite = 2
Stream.type = adTypeBinary
Stream.open
Stream.savetofile strDest, adSaveCreateOverWrite
EndTime = Timer
set Stream = nothing
set HTTP = nothing
filesys.DeleteFile "c:\newf1.zip"
TimeIt = 957/(EndTime - StartTime)
wscript.echo FormatNumber(TimeIt, 2) & " " & "KBps"______________________________________________________________
Message to End User: This one is simple. It's a simple pop up window that appears in front of all other windows on the end user side. I don't know why LMI doesn't just build this functionality into LMI Central........probably because they're always on vacation. Every time I ask for some new functionality I get a polite message back from them "we'll consider your idea.........".
Prerequisites: There is a charactor limit in your message. Think Twitter. If you use too many characters the task will error and the end user won't see the message. This task type is the simple "remote command".
We have outages at which we need to alert our end (cloud) users quickly without calling all of them. This is our preferred method. Note, the message will disappear after 999 seconds. This is the longest timeout available in the DOS msg code (to my knowledge).
msg * /time:999 **ATTENTION**There was ~20 minute outage in which a piece of networking hardware failed. We were able to resurrect this and do not anticipate any further issues.
______________________________________________________________
I hope someone finds these helpful. I understand that these won't be helpful to everyone, however if you note the importance of being able to use the "custom" task type to perform multiple tasks without having to run 2,3,4 tasks individually.
Please shoot me a message if this helped you out :)
Lj
- bridgew13 years agoNew Member
MsiExec.exe /x{D903B276-81AE-4AED-AEF9-45DACFBF16CE} /qn /norestart
This command had been tested to work with v2.7.10 of TightVNC but won't necessarily work with earlier versions if the GUID has been changed by the Developers of TightVNC