Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copy Malwarebytes rules from an updated PC to a folder

20 views
Skip to first unread message

Docfxit

unread,
Jun 21, 2017, 11:59:12 AM6/21/17
to
I'd like to copy Malwarebytes rules from a PC that has been updated to a folder so I can use them on a computer that won't connect to the internet.

I'm not getting it to copy properly.

Start of bat file:
@Echo On
If not exists "C:\ProgramData\Malwarebytes\MBAMService" goto :Olderversion
:: Version 3.x
xcopy "C:\ProgramData\Malwarebytes\MBAMService\*.*" "%~dp0\MalwarebytesUpdates\" /O /X /E /H /K /I
deltree "%~dp0\MalwarebytesUpdates\\ScanResults"
GoTo :Exit
:Olderversion
:: Version 2.x or older
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\rules.ref" "%~dp0\MalwarebytesUpdates\rules.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\domains.ref" "%~dp0\MalwarebytesUpdates\domains.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\ips.ref" "%~dp0\MalwarebytesUpdates\ips.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\actions.ref" "%~dp0\MalwarebytesUpdates\actions.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\swissarmy.ref" "%~dp0\MalwarebytesUpdates\swissarmy.ref"
xcopy "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\Configuration" "%~dp0MalwarebytesUpdates\Configuration" /O /X /E /H /K /I
:Exit
cmd

End of bat file:

This is what I get when I run it:
"C:\ProgramData\Malwarebytes\MBAMService" was unexpected at this time.

C:\Dnload\9xAddons\Malwarebytes' Anti-Malware>If not exists "C:\ProgramData\Malw
arebytes\MBAMService" goto :Olderversion

I do have the new version installed. I know the old version works fine.

Thanks,

Docfxit

pro...@berkeley.edu

unread,
Jun 21, 2017, 3:59:24 PM6/21/17
to
if not existS ?!?!?!?!?!?!?

Maybe that's your problem.... Again....

Docfxit

unread,
Jun 21, 2017, 4:53:18 PM6/21/17
to
That was exactly my problem.

That is really great of you for pointing that out for me.

Thanks a bunch,

Docfxit

This is the end result of what I have:

Start of bat file:
@Echo On
If not exist "C:\ProgramData\Malwarebytes\MBAMService" goto :Olderversion
:: Version 3.x
xcopy "C:\ProgramData\Malwarebytes\MBAMService\*.*" "%~dp0\MalwarebytesUpdates\mbamservice" /O /X /E /H /K /I /Y
rd "%~dp0\MalwarebytesUpdates\mbamservice\ScanResults"
GoTo :Exit
:Olderversion
:: Version 2.x or older
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\rules.ref" "%~dp0\MalwarebytesUpdates\rules.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\domains.ref" "%~dp0\MalwarebytesUpdates\domains.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\ips.ref" "%~dp0\MalwarebytesUpdates\ips.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\actions.ref" "%~dp0\MalwarebytesUpdates\actions.ref"
xcopy /y /e /s "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\swissarmy.ref" "%~dp0\MalwarebytesUpdates\swissarmy.ref"
xcopy "C:\Users\All Users\Malwarebytes\Malwarebytes Anti-Malware\Configuration" "%~dp0MalwarebytesUpdates\Configuration" /O /X /E /H /K /I
:Exit
@CMD > Nul

End of bat file:
0 new messages