Solved

Run this batch code in all machines

Posted on 2011-09-20
1
445 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now