Video Screencast Help

How To: Install one or more files to the root of the C:\ Drive

Created: 03 Feb 2010
rjemison's picture
+2 2 Votes
Login to vote

Although there is no native support or (easy method) to install a file on the root of the C:\ drive, from time to time it is necessary in order for an application function properly.  However, I recently had to an application which required this to be done and thought it would be a good idea to repost for everyone....since I could not find the original post from the old Wise KB many years ago.

Here are the steps required to install files directly on the root of the C:\ drive.

1.)  In the Installation Expert create a directory under the destination computer for your files to be placed in....(the name is irrelevant from a functional perspective but I name mine Root)
 
2.)  Add the files that you want installed directly to the root drive to this newly created directory.
 
3.)  Change from the Installation Expert to the MSI Script and add a custom action.  Use the Set Directory action, and place it right after the CostFinalize action in the Execute Immediate sequence.
 
4.)  In the Directory field, browse and select the directory you created off of the Destination Computer folder, (IE:  Root).
 
5.)  In the Directory Value field, enter "C:\".  Don't forget the backslash, and in addition if you wanted files to be placed on a different drive you could specify that drive letter here.
 
6.)  Compile and run the msi. The files should now show up in the root of the drive you select in the Set Directory action.

A final comment would be to pass along my thanks to whomever initially posted this on the old Wise KB.  I'm not sure where that post has gone over the years with the migrations to Juice and now Connect, but I wanted to repost because it is still quite applicable.