Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Run this batch code in all machines

Posted on 2011-09-20
1
Medium Priority
?
457 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
Lester_Clayton earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

596 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