I need to apply a transform to a .msi package, that includes adding a file to the rootdrive e.g. C:\file
I am using Installshield Tuner to try and do this, but there seems to be no option to add files to the root drive?
I have read various posts that advise how to chang the target dir to root, but all I want to do is add a single file, not the whole installation dir!

Any ideas on this would be appreciated.[:)]
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Well, the first thing I'd do is attempt to modify the application so it doesn't require a file in the root, preferably placing it in an appropriate Program Files folder, by searching the registry table or INIs for a reference to the file or c:\. You can also attempt to locally isolate the application and maybe that will cause it to look in the Program Files directory. There are several reasons to do this including security & standardization.

If you can't do that, I know in Wise there is an option which will permit you to unlock root directories so files can be added from an MSI. Check the InstallShield documentation/knowledgebase for that. If all of the above doesn't get you anywhere, you can always add the file to to the Program Files directory and at the last step of the Install Deferred MSI Script section (right before InstallFinalize) launch a custom action that will copy the file from Program Files to c:\. Be sure you qualify it with an IF NOT Remove so it isn't copied during uninstall, and add an Else to it which will delete the file during uninstalls.
Answered 01/27/2005 by: VikingLoki
Second Degree Brown Belt

Please log in to comment
0
I thought there was a way to install a file to the root of C:\ without having to do tricks, like installing to c:\program files directory first, then issue a copy command just before InstallFinalize. Is there?
Answered 04/05/2006 by: ccarmack
Yellow Belt

Please log in to comment
0
Found the answer:

How do I install files directly to the root of a specific drive?

Resolution
It is often necessary to install files directly to the root of a drive. This could be the same drive where the rest of the files are going to, or a different drive. By default, Windows Installer does not have built-in support for installing files directly to the root drive, because it is uncertain until runtime what the drive is going to be. Windows Installer by default will install files to the drive that has the most available free disk space. To work around this you can use a custom action to set the directory at run time to the drive required.

Follow these steps to install files directly to the root of any drive.

1. In the Installation Expert create a directory under the destination computer, MyDir.

2. Add the files to this directory that you want installed directly to the root drive.

3. Add a custom action, Set Directory, from the MSI Script editor, Execute Immediate, and place it right after the CostFinalize sequence.

4. In the Directory field, browse and select the directory you created off of the Destination Computer folder, MyDir.

5. In the Directory Value field, enter "C:\" or whatever drive you need the files to be placed in.

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.



Source: http://www.wise.com/KBArticle.aspx?articleno=1832
Answered 04/05/2006 by: ccarmack
Yellow Belt

Please log in to comment
0
Why not just use the [WindowsVolume] property, or am I missing something?

Alan
Answered 04/05/2006 by: ab2cv
Orange Senior Belt

Please log in to comment
Answer this question or Comment on this question for clarity