Creating a "Fake Drive" for Application Installs that Require One

Creating a

There are cases where an application needs access to a drive like H: to complete the installation of an application. Since, for example, you might be working on a VMware machine using a local user account.

Here's a trick to help you overcome this obstacle.

Instead of mapping your drive to a production drive, you can fake a drive on the machine using the Subst.exe command. You can fake an existing folder on the machine as a drive.

For creating an H: drive

  • Create a folder under "C:" eg. C:\test
  • Then use this command at command prompt:
    subst H: C:\test
    
    

Open My computer and you will see an H: drive there.

3.875
Average: 3.9 (24 votes)

Subst

In many cases, H:\ is always given for the user data folders..(For eg: Documents and Settings\user)

This CA in execute immediate is always used to continue the installation only if the H:\ exists. In real time scenario, when the package gets deployed and every user installs it, he will be having a H:\ for persuing the installation. Hence, there is a real no need for substituting the drive as an end user.

However, it may be useful when we test the MSI package in a machine admin user, where he doesnt have any profile access or drive.

Cheers'
Vijay

Vista

Beware about using subst on a Windows Vista. If created within non-elevated privileges, chances are your install (which is using elevated privileges hopefully) won't be able to access (or even see) it.

Syndicate content