Hello,
thanks for the answer, this at helped a bit, but there are still confusing
things going on:
> Please refer to the following MSDN example on how to use a registry search
> to determine the target directory for a file.
>
> Using a Registry Launch Condition to Specify a Target Directory
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
> ml/vxtskusingregistrysearchtospecifytargetdirectory.asp
I've checked for that, but it is not exactly the thing I need. The logic
should be:
A) check for regkey A and if existent copy the value to TARGETDIR
B) check for regkey B and if existent copy the value to TARGETDIR
B is more important as A (A is a legacy key from another product, B is the
last install path from THIS product)
How can I determine the order in which these are executed, so B can override
A?
> All the registry searches should be performed in the installation progress,
> but you may need to specify an item under the target registry key which you
> concerned, by the way the property name should be uppercase.
There is also some confusion, things like "[ProductName]" do not work
uppercase, only in the way they're defined in the property table, right?
There is also showing up another problem:
I create a registry value during installation, but when I install the
upgrade, it deinstalls the previous version and deletes the registry key
despite I marked it "DeleteAtUninstall = false". Is this a bug or do I have
to tweak with the "Transient" property (I understood it that "Transient" is
only neccessary when there is a CONDITION given, right?)?
thanks
doc
docschnipp - 03 Aug 2005 11:56 GMT
Hello,
I have a small addendum to the previous post:
> There is also showing up another problem:
> I create a registry value during installation, but when I install the
> upgrade, it deinstalls the previous version and deletes the registry key
> despite I marked it "DeleteAtUninstall = false". Is this a bug or do I have
> to tweak with the "Transient" property (I understood it that "Transient" is
> only neccessary when there is a CONDITION given, right?)?
Is it the way to be that if I change the version that I should NOT change
the product code to get the desired behaviour of the deinstallation of the
previous version?
thanks
doc
Phil Wilson - 03 Aug 2005 22:53 GMT
You can't really do that search/set TARGETDIR thing with VS setups. The way
I've done something similar this is to use a custom folder that has the
property value discovered by the registry search, defaulting to TARGETDIR.
Having another level of default if one registry search fails might be
p9ossible with another custom folder, but I don't think so. The short
answer is that you get VS setups free with Visual Studio, and there's a
reason that tools from InstallShield, Wise etc are not free - you can do
more with them, like what you are trying to do. Wix would let you do that
too with some custom actions in the right place.
ProductName is a case-sensitive Windows Installer property. It's not often
clear in a Visual Studio setup project, but the property list is documented
here, and yes they are case-sensitive.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/prope
rties.asp
Something else that might not be obvious, but VS upgrades using
RemovePreviousVersions are Windows Installer major upgrades, and yes, that
means that the old product is uninstalled then the new one is installed.
Apart from that, I think the problem you're seeing is that I think maybe
DeleteAtUninstall applies to data values under the key, not the key itself
(despite what the VS IDE implies) so you might find that they stay behind if
you mark each data item DeleteAtUninstall = False.
These may help in general:
http://www.simple-talk.com/2005/04/25/getting-started-with-setup-projects/
http://www.simple-talk.com/2005/06/07/visual-studio-setup/
http://www.simple-talk.com/2005/07/18/updates-to-setup-projects/

Signature
Phil Wilson [MVP Windows Installer]
----
> Hello,
>
[quoted text clipped - 43 lines]
>
> doc