:w00t: the hardest part is done!
Still work needs to be done...plugin not complete
In order to get installer working in PE ImRamdisk must used to remove b: or installer will not run. An error is thrown when using virtual disk for temp location. (This is only needed during install while getting plugin together)
Temp and Tmp environment variables must be changed to something other than b: (create a folder named temp on y:)
set temp=y:\temp
set tmp=y:\temp
Then installer will run.. :thumbsup:
[attach=1]
I may still need help with plugin creation :embarrassed: we will see...
I am trying to add a download option to this plugin.
When using
%FileWeb_x86%=https://downloads.malwarebytes.com/file/mb3
The file is downloaded with no extension?
The above link automatically direct downloads the latest version, wget gets the right file it just doesn't use the correct name, the file thats downloaded can be renamed to .exe Is this normal for download button? Is there a way to add a name or should I have the script rename it to latestmb3.exe? I currently am renaming the file after download get an error that the download didn't complete correctly however it is working correctly...(this only happens when i rename the file though, i think there is error checking to make sure file is downloaded and im renaming before it can check, i can fix this if this is the best way) Trying to make this correctly for community.
It looks like the hash at the top of the ServiceConfig.json file does not match something and the self protection mechanism is kicking in and reassigning the paths for data (needed files) to default on the c:\
B191577A8A02F3CA15F219FE18AD5C3B5C89075CBC2263D276C51F1C798B7D12
{
"affiliateId" : "",
"affiliateName" : "consumer",
"checkConfig" : true,
"dataPath" : "X:\\ProgramData\\Malwarebytes\\MBAMService",
"delayInterval" : 15000,
"delayStart" : false,
"installPath" : "Y:\\Programs\\Malwarebytes 3",
"logFileBackups" : 10,
"logFilePath" : "X:\\ProgramData\\Malwarebytes\\MBAMService\\logs\\mbamservice.log",
"logFileSize" : 10485760,
"maxLogLevel" : "info",
"productBuild" : "consumer",
"productCode" : "MBAM-C",
"productVersion" : "3.6.1.2711"
}
It is a shame too because control of these paths would make it possible to completely make the application portable.. (except the services)
This means if your testing on a machine with Malwarebytes 3 installed on the host the plugin will work when running it from your USB. If you do not have MB3 on the host the plugin will fail when running it from your USB..
- Back to the drawing board..
What a pain in the rear end this software is to make portable :tongue:
Instead, for the sake of usability now, I caved into James's method, and am using the installer file as a base. I created a simple launcher with AutoIT3 that checks to see if the program is already installed at the default /VerySilent path, if it is it only opens the gui and completes(This way you don't reinstall every time you click the shortcut for the launcher), if not it silently installs MB3, removes the public desktop icon after install, then opens the gui.. (This needs to be done because silent install opens the software to tray and does not present the GUI)
It is compiled to MB3Launcher.exe but below is the au3 source
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=mb3_MAINICON.ico
#AutoIt3Wrapper_Res_Description=Malwarebytes 3
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
Local $sFilePath = "X:\Program Files\Malwarebytes\Anti-Malware\mbam.exe"
Local $iFileExists = FileExists($sFilePath)
If $iFileExists Then
Run('X:\Program Files\Malwarebytes\Anti-Malware\mbam.exe')
Else
RunWait('MB3.EXE /VerySilent', @ScriptDir)
FileDelete ('X:\Users\Public\Desktop\Malwarebytes.lnk')
Run('X:\Program Files\Malwarebytes\Anti-Malware\mbam.exe')
EndIf
Exit
Res_Description=Malwarebytes 3 - is necessary so that pinned shortcut name displays correctly (as Malwarebytes 3) otherwise the EXE name is used for the pinned item.
The same process of downloading the latest version to the file container is still used in this version.
SE Plugin: [attach=1]