Solved

Run this batch code in all machines

Posted on 2011-09-20
1
446 Views
Last Modified: 2012-06-21
Hi,

Run this batch code in all machines
Can anyone help with a way
Thanks
@echo off
echo+
echo ** Running Malwarebytes' Anti-Malware installation batch script **
%~d0
cd %~dp0
\\isiosl\mbam-setup.exe /NOCANCEL /NORESTART /VERYSILENT /SP- /SUPPRESSMSGBOXES
ping -n 6 -w 1000 1.1.1.1 >NUL
IF DEFINED programfiles(x86) (cd "%programfiles(x86)%\Malwarebytes' Anti-Malware") ELSE (cd "%programfiles%\Malwarebytes' Anti-Malware")
START /WAIT mbam.exe /register 4WF67-S87DH A5E5-FFCK-E72H-G9HQ
START /WAIT mbam.exe /hideregistration
START /WAIT mbam.exe /update -silent
START /WAIT mbam.exe /schedule /update /silent /daily /wakefromsleep /every 1 /starting 07/01/2011 04:30:00 /recover 23 /random
START /WAIT mbam.exe /schedule /scan -quick -remove -terminate -log -reboot /wakefromsleep /silent /daily /every 1 /starting 07/01/2011 02:00:00 /recover 23
SC QUERY MBAMSERVICE >NUL | FIND "RUNNING"
IF %ERRORLEVEL% == 0 GOTO :REGISTERED
:NONREGISTERED
START /WAIT mbamgui.exe /install /silent
START mbamgui.exe /starttray /silent
GOTO :DONE
:REGISTERED
START mbamgui.exe /starttray /silent
GOTO :DONE
:DONE

Open in new window

0
Comment
Question by:bsharath
1 Comment
 
LVL 9

Accepted Solution

by:
Lester_Clayton earned 500 total points
ID: 36571861
Place your batch file in a central location - perhaps in the same area where the users run mbam-setup.exe from. Create a file containing a list of all the computer names, and then use PSEXEC to parse the list and execute the application on all machines.

Sample:

psexec @computerlist.txt \\isiosl\Distro\Malwarebytes\MalwareInstall.cmd

Open in new window


PSEXEC can be obtained from www.sysinternals.com

I'd recommend running PSEXEC /? to see all the arguments the program will supply, but in a pinch you probably only need to use the @file one.  You will also need to accept the license agreement the first time you run it.

Naturally, just put 1 computer name in the computer file to ensure it works before putting them all in.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question