Groups | Blog | Home
all groups > visual studio .net setup > september 2007 >

visual studio .net setup : File install depending on registry key ?


Sharon
9/6/2007 1:46:03 AM
I'm using VS2005 Setup project.

I need to check if a specific registry key exist in the registry.
If it exists - to skip installing some file.
If not exists - to installing some file.

I guess it should be done in two stages, one reading the registry key, and
the other is to install or not install the file accordingly.

I tried setting the first stage using the Launch Conditions, but it causes
to the entire install to quite, but I only need it to determine if to install
a specific file or not, without any notification to the user.


Can anybody help on that?


--
Thanks
Phil Wilson
9/6/2007 10:24:52 AM
It's possible you can't do this with Visual Studio setup projects.

Search Target Machine can be used to search for items in the registry but
unless you can search for a data item under that key you can't do it. For
example you can do a Search Target Machine for the item InstallRoot under
HKLM\Software\Microsoft\.NETFramework, but you can't do a search only on
that .NETFramework key.
If you CAN do a search like this, it will set a property. Use this property
as a condition on installing the file.

Since you're asking a lot of VS setup questions these should be helpful:

http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/

http://www.simple-talk.com/dotnet/visual-studio/visual-studio-setup---projects-and-custom-actions/

http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/


--
Phil Wilson
[MVP Windows Installer]

[quoted text, click to view]

AddThis Social Bookmark Button