I'm looking for a way to make some of my windows programs see a different view of the hard-drive as follows -

Let's say I want to make the contents of c:\folder1\folder2 look like d:\folder3 to one of my programs, and just that program.

I don't want to use symbolic links or junction points, as it will make all programs see it.

Any solution?

  • Impossible. You can't do this for just one application. You can however use a junction to create a new folder, and set that program to use that folder while your other programs don't. – LPChip Jun 16 '18 at 20:35
  • 1
    You could try creating a shim (sdb file that you install with sdbinst.exe) to redirect the file location for a specific process. To do so, look into the Application compatibility toolkit from Microsoft and CorrectFilePaths. – HelpingHand Jun 16 '18 at 20:36
  • 1
    @HelpingHand that sounds like an answer. – LPChip Jun 16 '18 at 20:37
  • @HelpingHand can you please write your suggestion an answer so I could mark it as a solution? I used these guides to easily install microsoft's toolkit and make an application shim - msigeek.com/4543/… msigeek.com/4819/… – Arik Jun 16 '18 at 23:12
  • @Arik you can answer your own question and mark it as solution if HelpingHand does not. – Moab Jun 17 '18 at 2:38

ACT is the Microsoft Application Compatibility Toolkit and can be used to generate shims for the Windows platform. A shim is a small library which transparently intercepts an API, changes the parameters passed, handles the operation itself or redirects the operation elsewhere.

In the case of redirecting the file system which is required here, the CorrectFilePaths shim can be used to redirect files from one location to another. For redirecting the registry, VirtualRegistry can be used in a similar fashion.

After installing the ACT it can be launched from: Start Menu - Microsoft Application Compatibility Toolkit, then choosing the Compatibility Administrator Tool.

Right-click on New Database and then choose an Application Fix. Continue through the wizard providing a name for the package (will appear in Programs and Features) and then choosing the CorrectFilePaths shim from the list. The syntax for this shim is: "oldpath";"newpath".

At the page where you describe the "Matching information" you can choose which processes load the shim, the values to match on include file version, file name, company name, etc..

Having generate a .sdb file using ACT, this can be installed (or uninstalled) on computers using the command line sdbinst.exe application, which is installed by default on Windows. The example usage for the tool is as follows:

Usage: sdbinst [-?] [-q] [-u] [-g] [-p] [-n[:WIN32|WIN64]] myfile.sdb | {guid} | "name"
    -? - print this help text.
    -p - Allow SDBs containing patches.
    -q - Quiet mode: prompts are auto-accepted.
    -u - Uninstall.
    -g {guid} - GUID of file (uninstall only).
    -n "name" - Internal name of file (uninstall only).
  • As an alternative of installing using sdbinst.exe, you can right click on the new DB record in the toolkit, and choose install. – Arik Jun 17 '18 at 7:53

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.