Favor Source and Registry
Posted 03 November 2003 - 00:21
Now, when I install this MSI and select Run From Network for the features, the registry-entry will stil point to to Local directory that INSTALLDIR originally points to.
I can work around this by specifying the INSTALLDIR from the command line, and letting it point to the network location where the files reside, but that isn't a solution I like.
Am I missing some easier way to do this? I would expect a component that is set to Favor Source to use the Source directories for everything it does, so including the registry modifications.
Posted 03 November 2003 - 15:15
I've created a very simple MSI, containing only one Feature, one Component, One File and One Registry Entry.
The Feature is named Feature1 and set to Favor Source. It contains the component Component1 which is set to Install into [INSTALLDIR] and has its Remote Installation option set to Optional. The component also contains one Registry Entry. In HKLM\SOFTWARE\[Manufacturer]\[ProductName] I create a String Value named RootDir with the value [$Component1].
After installing the MSI my RootDir contains the value [$Component1].
You said to use [$ComponentName], but the Platform SDK talks about [$ComponentKey]. I'm assuming you mean the same thing, which is the actual name of the component.
The SDK also states
|In the Value column of the Registry Table, this substring may refer to the action state or the requested action state of the component. In all other cases, this substring refers to the action state of component.|
I must admit that I don't undestand what is meant by that. I'd say that the action state is something else than the directory of the component. But the SDK continues with
|For example, If the component is run from the source, the value is the source directory of the file. If the component is run locally, the value is the target directory after installation.|
I've also tried using [#filekey] (in my case [#File1.TXT]), and that does work.
So I'm stuck here. What am I doing wrong? I sure hope you can help.
Posted 03 November 2003 - 15:23
Change this to [Component1] and it should work.
Posted 03 November 2003 - 15:35
You are right . InstallShield tries to "help" by thinking it knows better than me what I want.
That it changes my [Component1] into [\$Component1[\]] is one thing, but it displays both values in the registry view as [Component1]. So the only way to find out what is the actual value is to look directly in the Registry table.
So I guess this message should now be in the InstallShield Developer forum?
Posted 03 November 2003 - 16:37
|QUOTE (comecme @ 2003-11-03 16:35)|
|So I guess this message should now be in the InstallShield Developer forum?|
I believe that other authoring tools work in a similar way.