Hello All,

I have an issue which searching your sight has resolved but brought about another problem. Here is my tale:

I need to install a program to the D:\ drive for server installations. I have tried to use the ROOTDRIVE="D:\" method but it does not work. I have found an explanation which I think applies: (From another post)

** If you set ROOTDRIVE equal to D:\ in this case, INSTALLDIR will still resolve to C:\Program Files\Test\. The reason is the System Folders property group (msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/system_folder_properties.asp). The ProgramFilesFolder entry will be resolved by Windows Installer to the defined Shell Folder on the system, regardless of what you have defined for the ROOTDRIVE.**

I have been sucessful in creating a SET Directory custom action (User Interface after CostFinalize)
Custom Action Name: SetNewROOTDir
Directory: INSTALLDIR
Directory Value: "D:\Program Files\AppName"

This compiles and runs but I get the following error: (I think the CA is working because it is trying to go to D:\)

[font="courier new"]Error 1606. Could not access network location "D:\Program Files\AppName"

I do have a "D:\ drive" available and I can access it (Read\Write). Please help. Thanks

[font="courier new"]
[font="courier new"]
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
D:\Program Files\AppNameORIGINAL: donkeykonger30

I have an issue which searching your sight has resolved but brought about another problem. Here is my tale:

I need to install a program to the D:\ drive for server installations. I have tried to use the ROOTDRIVE="D:\" method but it does not work. I have found an explanation which I think applies: (From another post)

** If you set ROOTDRIVE equal to D:\ in this case, INSTALLDIR will still resolve to C:\Program Files\Test\. The reason is the System Folders property group (msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/system_folder_properties.asp). The ProgramFilesFolder entry will be resolved by Windows Installer to the defined Shell Folder on the system, regardless of what you have defined for the ROOTDRIVE.**

I have been sucessful in creating a SET Directory custom action (User Interface after CostFinalize)
Custom Action Name: SetNewROOTDir
Directory: INSTALLDIR
Directory Value: "D:\Program Files\AppName"

This compiles and runs but I get the following error: (I think the CA is working because it is trying to go to D:\)

[font="courier new"]Error 1606. Could not access network location "D:\Program Files\AppName"

I do have a "D:\ drive" available and I can access it (Read\Write). Please help. Thanks


Rather than setting the directory in a CA, create entries in the Directory and CreateFolder tables:
If you set ROOTDRIVE to D:\ TARGETDIR will be D:\

In Directory table

Directory Directory_Parent DefaultDir
ProgFiles TARGETDIR Program Files
INSTALLDIR ProgFiles AppName

In CreateFolder table

Directory_ Component_
INSTALLDIR CompName

(make it a component with a file which has a file with keypath in INSTALLDIR, or you can do what Wise does and create your own CreateFolder component)
Answered 12/22/2008 by: aogilmor
Ninth Degree Black Belt

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