Solved

Run this batch code in all machines

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

757 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

21 Experts available now in Live!

Get 1:1 Help Now