Does anyone have a script to uninstall unused programs? Also does anyone have any suggesstions on how to use One2Many to keep computers running fast without anything popping up or notifying users? Thanks all.
-ColWhackaMole
Here's a handy batch file for MySQL Databases (selects, updates, etc):
rem - Note SQL Statements that generate files should have their outfile deleted first! set sqlcommand="Your SQL Statement Here" rem - Nav to your MySQL / MariaDB Instance, edit path to your preference: cd d:\ cd "d:\mariadb 5.5\bin\" rem - Pipe your SQL command into a txt file: echo %sqlcommand% > sql.txt rem Execute your SQL, provide username and password as arguments to the batch file: mysql --user=%1 --password=%2 --database="database name" < sql.txt
Might be messy, but sure as heck effective!
Added Bonusl when setting up the task, specify the text file (if one is created by your statement) as the log file in LMI, and now you can view the resulting file in LMI. (Feature Suggestion: email the log file along with the task summary emails!)
Also in hindsight, the database name could be another batch file argument!
I am looking for a script to run antivirus when a malware/virus infection is found. Also, would like the script to have a time feature, so I can have it run when clients are not in the office, like between 10-12pm CST.
Also can anyone point me in the direction of a how to guide on script writing? I am fresh out of college and still learning the LogMeIn system.
Hi
Has anyone got a spiceworks script that I can pump put via this method?
Thanks in advance.
Code I scraped together that will:
1 dertermin OS
2 Update MSE
3 Full Scan with MSE
File: MSE-Update-Scan-Vista-8.bat
rem - MSE: Update and scan system from CMD as a background process. @ECHO OFF CLS ver|find "Windows XP" > NUL if errorlevel 1 goto 2K ECHO Windows XP Detected. goto END :2K ver|find "Windows 2000" >NUL if errorlevel 1 goto 2k3 ECHO Windows 2000 Detected. goto END :2K3 ver|find "Version 5.2" >NUL if errorlevel 1 goto WinVista ECHO Windows 2003 Detected. :WinVista ver|find "Version 6.0" >NUL if errorlevel 1 goto Win7 ECHO Windows Vista Detected. Echo Updating Microsoft Security Essentials Signatures "%programfiles%\Microsoft Security Client\mpcmdrun.exe" -SignatureUpdate Echo Run Full Scan: "%programfiles%\Microsoft Security Client\mpcmdrun.exe" -scan -scantype 2 :Win7 ver|find "Version 6.1" >NUL if errorlevel 1 goto Win8 ECHO Windows 7 Detected. Echo Updating Microsoft Security Essentials Signatures "%programfiles%\Microsoft Security Client\mpcmdrun.exe" -SignatureUpdate Echo Run Full Scan: "%programfiles%\Microsoft Security Client\mpcmdrun.exe" -scan -scantype 2 :Win8 ver|find "Version 6.2" >NUL if errorlevel 1 goto ERR ECHO Windows 8 Detected. Echo Updating Microsoft Security Essentials Signatures "%programfiles%\Windows Defender\MpCmdRun.exe" -SignatureUpdate Echo Run Full Scan: "%programfiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 2 goto END :END ECHO.
Is there amy way to slam in a password change without the password appearing in the log? I just had to change all my administrator passwords on short notice but now the results of the command line "net user" are in the log files.
Anyone have a script for uninstalling tightvnc?
Sincere thanks
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
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
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