Creating a "Fake Drive" for Application Installs that Require One
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.
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
Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com
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.
Another way to do
You can also map a fake drive with net.exe
You can use command
net use H: \\{the computer name}\c$\test
net.exe resides in system32 folder and can be easily used.
Piyush Nasa
Altiris Certified Professional (ACP)
Would you like to reply?
Login or Register to post your comment.