all groups > dotnet setup > august 2005 >
You're in the

dotnet setup

group:

CustomAction


CustomAction YuriL
8/9/2005 8:28:22 AM
dotnet setup:
Hi,
I'm using Visual Studio Installer to create my setup. The location to which
I install my files needs to be based on a registry entry that is created by
another product. Basically I would read the registry value, parse only
information that I need from this value, and use this newly created string as
the DefaultLocation. I know about the Registry Search feature, but I cannot
use the registry entry as is - I need to parse a part of that entry to get my
install path. I cannot figure out a way to do this. I thought of using
custom actions, but I don't know how to return a value from them to set the
DefaultLocation property to the value I need. Can anyone please help?

Thanks!
Re: CustomAction Phil Wilson
8/17/2005 11:27:19 AM
I don't believe there's any way you can do this with a Visual Studio setup.
The problem is basically that the custom actions generated by Visual Studio
are all deferred and all sequenced pretty much when the install is over, so
it's much too late to influence a destination folder. You can do this with
Windows Installer and other tools that build MSI files, but VS isn't one of
them.
You could do this with a launch program that searches for the registry
value, manipulates it and passes it to the install with a command like:
msiexec /i <path to msi> MYFOLDER=C:\SomeFolder\
or whatever the value is. In the setup you'd have a Custom Folder that uses
MYFOLDER as its defauilt location.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

[quoted text, click to view]

AddThis Social Bookmark Button