Jump to content

Running MBAM under Directory Junctions


Recommended Posts

Not sure if anyone can assist with this because I think my situation is pretty unusual, but thought I'd toss it out there anyway...

I've relocated my Program Files, ProgramData, and User Profile to a different partition and created pointers to the new location using Directory Junctions.

So, for example, my Program Files (x86) folder is at:

D:\Program Files (x86)

but on C: drive I have a junction at:

C:\Program Files (x86)

that points to the folder in D: drive.

The same thing was done for the other folders mentioned.

They all retain exactly the same folder structure - just the drive letter has changed.

So far, in my testing all other apps I have work with the exception of MBAM.

So I do an install, keeping all the defaults.

It gets installed to

C:\Program Files (x86)

Which means it actually get installed to:

D:\Program Files (x86)\Malwarebytes' Anti-Malware

but the OS thinks it's still at:

C:\Program Files (x86)\Malwarebytes' Anti-Malware

When I go to run the program (opting to update and launch the program after install is done), all hell breaks loose:

MBAM_ERROR_EXPANDING_VARIABLES (0,9)

Then it downloads the latest update.

When that completes:

MBAM_ERROR_LOAD_DATABASE (3,0)

The system cannot find the path specified.

After that error is closed:

MBAM_ERROR_EXPANDING_VARIABLES (0,9)

After that error is closed:

MBAM_ERROR_MISSING_FILE (3,0, mbamswissarmy.sys)

When I do a search for this file on the drive, it is present

C:\Windows\SysWOW64\drivers

Then it closes and MBAM doesn't open.

If I try to launch it from the desktop, I get 2 errors:

MBAM_ERROR_EXPANDING_VARIABLES (0,9)

MBAM_ERROR_MISSING_FILE (3,0, mbamswissarmy.sys)

I've tried uninstalling, running mbam-clean, installing in different locations - all same result.

If anyone has any ideas/suggestions, it would be appreciated!

Link to post
Share on other sites

Hi -

Please try this fix for a start - It should help you - You have not listed XP Vista or Win7 , so I included all versions -

You may need to change directories to suit your situation -

This will fix the MBAM_ERROR_EXPANDING_VARIABLES (0,9) situation -

Show Hidden Files and Folders in Windows XP:

  • Click Start and select My Computer
  • Click the Tools item from the menu at the top of the window (if you don't see Tools press the Alt key on your keyboard and it will appear)
  • Select Folder Options
  • Click the View tab and make sure Show hidden files and folders is selected under Hidden files and folders
  • Next, uncheck the box next to Hide protected operating system files (Recommended)
  • Then, uncheck the box next to Hide extensions for known filetypes
  • Click Apply then click OK

Then go to C:\Documents and Settings\All Users\Application Data\Malwarebytes\Malwarebytes' Anti-Malware and delete rules.ref. Once you've done that, start MBAM and when it shows the error and asks to update, let it do so and see if that corrects it.

Show Hidden Files and Folders in Windows Vista and Windows 7:

  • Click on the Start vista-7-start.png button and select Computer
  • Press the Alt key on your keyboard and click on Tools
  • Select Folder Options
  • Click the View tab and make sure that Show hidden files and folders is selected under Hidden files and folders
  • Next, uncheck the box next to Hide protected operating system files (Recommended)
  • Then, uncheck the box next to Hide extensions for known filetypes
  • Click Apply then click OK

Then go to C:\ProgramData\Malwarebytes\Malwarebytes' Anti-Malware and delete rules.ref. Once you've done that, start MBAM and when it shows the error and asks to update, let it do so and see if that corrects it.

Reset Hidden Files and Folders in Windows XP:

  • Click Start and select My Computer
  • Click the Tools item from the menu at the top of the window (if you don't see Tools press the Alt key on your keyboard and it will appear)
  • Select Folder Options
  • Click the View tab and make sure Do not show hidden files and folders is selected under Hidden files and folders
  • Next, check the box next to Hide protected operating system files (Recommended)
  • Then, check the box next to Hide extensions for known filetypes
  • Click Apply then click OK

Reset Hidden Files and Folders in Windows Vista and Windows 7:

  • Click on the Start vista-7-start.png button and select Computer
  • Press the Alt key on your keyboard and click on Tools
  • Select Folder Options
  • Click the View tab and make sure that Do not show hidden files and folders is selected under Hidden files and folders
  • Next, check the box next to Hide protected operating system files (Recommended)
  • Then, check the box next to Hide extensions for known filetypes
  • Click Apply then click OK

Thank You - :)

Link to post
Share on other sites

This is most likely happening because of the junctions. MBAM's registry settings all tell the program to look for its own files in "C:\Program Files (x86)\Malwarebytes' Anti-Malware" and the program itself will not be redirected by junctions. Aside from going into all of MBAM's reg keys and altering the install path to the new one, thus avoiding any junctioning, I don't know of any way to fix it and doing that could be risky if you aren't comfortable editing the registry.

Link to post
Share on other sites

Repointed all the registry paths - same errors.

Only think I can think of is maybe there's something in the configuration/program that's using a variable such as:

%PROGRAMDATA%

which points to C:\ProgramData

I've seen this interfere with Chrome in a minor way (installing Extensions) and it was fixed by changing the environment variables for temp files, so maybe those don't play well with junctions (even though, when enter the variable in explorer, it goes to the proper place).

Link to post
Share on other sites

I would just do a fresh install of malwarebytes, and pointing it to the right location for the D: during the install, instead of using junctions for this program.....

Please try the following to see if it helps:

Windows XP:

  • Click on Start and select Control Panel
  • Open Add/Remove Programs
  • Uninstall Malwarebytes' Anti-Malware
  • Restart your computer very important
  • Download and run mbam-clean.exe from here
  • It will ask to restart your computer, please allow it to do so very important
  • After the computer restarts, temporarily disable your Anti-Virus and install the latest version of Malwarebytes' Anti-Malware from here
    • Note: You will need to reactivate the program using the license you were sent via email if using the Pro version
    • Launch the program and set the Protection and Registration. Then go to the UPDATE tab if not done during installation and check for updates.
      Restart the computer again and verify that MBAM is in the task tray if using the Pro version. Now setup any file exclusions as may be required in your Anti-Virus/Internet-Security/Firewall applications and restart your Anti-Virus/Internet-Security applications. You may use the guides posted in the FAQ's here or ask me and I'll explain how to do it.

Windows Vista and Windows 7:

  • Click on the Start vista-7-start.png button and select Control Panel
  • Click on Programs and Features
  • Uninstall Malwarebytes' Anti-Malware
  • Restart your computer very important
  • Download and run mbam-clean.exe from here
  • It will ask to restart your computer, please allow it to do so very important
  • After the computer restarts, temporarily disable your Anti-Virus and install the latest version of Malwarebytes' Anti-Malware from here
    • Note: You will need to reactivate the program using the license you were sent via email if using the Pro version
    • Launch the program and set the Protection and Registration. Then go to the UPDATE tab if not done during installation and check for updates.
      Restart the computer again and verify that MBAM is in the task tray if using the Pro version. Now setup any file exclusions as may be required in your Anti-Virus/Internet-Security/Firewall applications and restart your Anti-Virus/Internet-Security applications. You may use the guides posted in the FAQ's here or ask me and I'll explain how to do it.

Link to post
Share on other sites

Firefox's suggestion will work for the files in the %programfiles(x86)% folder, but not for the files and folders under %programdata% or %appdata%, both of which are locations used by MBAM. If you altered all of Windows' environmental variables for those locations to point to the new paths that should fix it, but again, please proceed with caution.

From the knowledge you've shown thus far I'm guessing you have a pretty good grasp on things, but I'll post this anyway just as a precaution:

Backup the Registry:

Modifying the Registry can create unforeseen problems, so it always wise to create a backup before doing so.

Note: Please read the page carefully, especially the info on using it with Vista/7.

  • Please download ERUNT from here
  • ERUNT (Emergency Recovery Utility NT) is a free program that allows you to keep a complete backup of your registry and restore it when needed.
  • Double click on erunt-setup.exe to Install ERUNT by following the prompts.
  • Use the default install settings but say NO to the portion that asks you to add ERUNT to the Start-Up folder. You can enable this option later if you wish.
  • Start ERUNT either by double clicking on the desktop icon or choosing to start the program at the end of the setup process.
  • Choose a location for the backup.
    • Note: the default location is C:\Windows\ERDNT which is acceptable.

    [*]Make sure that at least the first two check boxes are selected.

    [*]Click on OK

    [*]Then click on YES to create the folder.

Note: if it is necessary to restore the registry, open the backup folder and start ERDNT.exe

Link to post
Share on other sites

Update:

I re-pointed all of the environment variables to the locations on D: drive (when applicable) - same problem.

I experimented with creating junctions to the folders on D: drive in different combinations (each time reverting back to saved backup images of both C: and D: when I wanted to "reset").

For some reason, I can't have Junctions for both:

Program Files

and

Program Files (x86)

pointing to the folders on D: drive at the same time.

If I have Program Files on D: drive but Program Files (x86) on C: drive - it works (installing MBAM to D:\Program Files (x86)).

If I have Program Files (x86) on D: drive but Program Files on C: drive - it works (installing MBAM to D:\Program Files (x86)).

If I have both of those folders on D: drive (with junctions pointing to them from C:), I get the errors.

The other folders - Program Data and Users, don't seem to interfere.

I had it set up so that Program Files (x86), Users, and ProgramData were all on D: drive (junctions pointing to all) and Program Files on C: - MBAM installed and ran successfully.

I renamed Program Files (from boot disk), created a junction pointing to a copy of it on D: drive - MBAM errored out after the install (same errors as before).

I deleted the junction and changed the name of Program Files on C: drive back - MBAM installed and ran successfully.

Funny thing is, MBAM doesn't even seem to put anything into Program Files - I checked before and after an install and it had exactly the same byte count.

I can only guess that something in MBAM might be getting confused by some pathing when both PF and PF (x86) are on D: drive with junctions pointing to them.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.