JSI Tip 3236. Can I relocate '\Program Files\'?



I have never found a supported way to accomplish the subject task, but here is a procedure that 'mostly' works:


1. Close ALL programs on your desktop.


2. Use Regedt32 to navigate to the following value names and change the data values to reflect the new location:


    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Currentversion\ProgramFilesDir

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Currentversion\CommonFilesDir


3. For Windows 2000, also modify:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Inetstp\ProgramFilesPath

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SFC\CommonFilesDir

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SFC\ProgramFilesDir


4. MOVE the current Program Files folder, and sub-folders, to the new location.


5. Search ALL shortcuts, *.lnk files, on the current \Program Files drive, for \Program Files content. For each shortcut returned, right click the shortcut and press Properties. Change any affected Target: and Start in:.


6. Use Regedit to search for Data that contains \Program Files\ and change any affected data values.


7. Shutdown and restart your computer.


The reason this 'mostly' works is that some installation programs do NOT check the ProgramFilesDir and CommonFilesDir registry entries.

NOTE: On Windows 2000, the CommonProgramFiles environment variable is set from the CommonFilesDir value name and the ProgramFiles environment variable is set from the ProgramFilesDir value name.

NOTE: On Windows 2000, you can limit your *.lnk search to the Documents and Settings folder and sub-folders, plus the SystemRoot%\Profiles folder. On Windows NT, use the SystemRoot%\Profiles folder. If you are doing this for your network, search any server based profile location.


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish