Posted February 14, 20178 yr I made a install script for MalwareBytes to do a Silent install. UPDATED VERSION 2 With auto detect if Invoke-WebRequest exists Improvements are welcome! Change the version if needed in the Source URL: https://data-cdn.mbamupdates.com/web/mb3-setup-consumer-3.0.6.1469.exe # Silent Install MalwareBytes # Download URL: https://www.malwarebytes.com/mwb-download/thankyou/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $source = "https://data-cdn.mbamupdates.com/web/mb3-setup-consumer-3.0.6.1469.exe" $destination = "$workdir\mbam.exe" Invoke-WebRequest $source -OutFile $destination # Start the installation Start-Process -FilePath "$workdir\mbam.exe" -ArgumentList "/NOCANCEL /NORESTART /VERYSILENT /SUPPRESSMSGBOXES" # Wait XX Seconds for the installation to finish Start-Sleep -s 35 # Remove the installer rm -Force $workdir\mbam* For Windows 7 please change $source = "https://data-cdn.mbamupdates.com/web/mb3-setup-consumer-3.0.6.1469.exe" $destination = "$workdir\mbam.exe" Invoke-WebRequest $source -OutFile $destination To $WebClient = New-Object System.Net.WebClient $WebClient.DownloadFile("https://data-cdn.mbamupdates.com/web/mb3-setup-consumer-3.0.6.1469.exe","$workdir\mbam.exe") Since Powershell in Windows 7 does not support the Invoke-WebRequest Â
February 14, 20178 yr Author I did some checks with command line options to initiate a Scan, but it would not let me do it. Link to the switches: http://www.gegeek.com/documents/B16E4181A9CDD6828ECADB10CD9204EF472E2E04.html mbam.exe âparameter (where parameter is one of the following) âdebug: allows you to collect information to send as a bug report. âdeveloper: this command line parameter is explained in the false positives section. âminimized: allows you to start the program minimized. âquickscan: allows you to run a quick scan. âquickscanterminate: allows you to run a quick scan. Program terminates if no items found. âfullscan: allows you to run a full scan. âfullscanterminate: allows you to run a full scan. Program terminates if no items found. ârunupdate: allows you to update the program without displaying result dialogs. âregister: allows you to register the program without displaying main dialog. âfullauto: allows you to run a full scan silently. Examples âupdateshowdialog: allows you to update the program displaying all dialogs. âschedule : allows you to schedule an update and scan for a specific hour. Scan will happen 5 minutes after update. Example: mbam.exe âschedule 0 (will schedule for 12:00 AM local time) Example: mbam.exe âschedule 5 (will schedule for 5:00 AM local time) Example: mbam.exe âschedule 23 (will schedule for 11:00 PM local time) If someone has got this to work with the free or activated version let me know. I think it would only work with the enterprise version, and they removed the options form the Free / Activated Version
February 14, 20178 yr Author Version 2 This version will check if the Invoke-WebRequest Command exists or not. For legacy Systems like Windows 7 you than only have one Script and don't need to change things in Pulseway # Silent Install MalwareBytes # Download URL: https://www.malwarebytes.com/mwb-download/thankyou/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir  -ItemType directory } # Download the installer $source = "https://data-cdn.mbamupdates.com/web/mb3-setup-consumer-3.0.6.1469.exe" $destination = "$workdir\mbam.exe" # Check if Invoke-Webrequest exists otherwise execute WebClient if (Get-Command 'Invoke-Webrequest') {    Invoke-WebRequest $source -OutFile $destination } else {   $WebClient = New-Object System.Net.WebClient   $webclient.DownloadFile($source, $destination) } # Start the installation Start-Process -FilePath "$workdir\mbam.exe" -ArgumentList "/NOCANCEL /NORESTART /VERYSILENT /SUPPRESSMSGBOXES" # Wait XX Seconds for the installation to finish Start-Sleep -s 35 # Remove the installer rm -Force $workdir\mbam* Â
February 7, 20187 yr Current download location / might changes very fast again .. https://data-cdn.mbamupdates.com/web/mb3-setup-consumer/mb3-setup-consumer-3.3.1.2183-1.0.262-1.0.3881.exe
Create an account or sign in to comment