views:

3950

answers:

5

Hi all,

I'm trying to make a setup program for a asp.net web site. I need to make sure the target machine has sqlxml installed.

I must verify the target machine has the software installed, and if not, launch a .msi file either before or after the main installation.

I'm a complete newbie with setup projects so maybe this is obvious but after several hours browsing the web I haven't found a satisfactory solution. I've been reading about WiX etc but I'm looking (if possible) for a simple solution.

+4  A: 

Unfortunately, you can't run one installer from another, since only one can be running at a time. You need to chain them together and run one after the other. Google "msi chaining". This is often the reason why products like Visual Studio use an external setup.exe which then runs the installers one after the other.

Brent Rockwood
A: 

Brent's answer is correct. I would just add that, sometimes, you can find a "merge module" for the bits you depend on. That's a .msm file. You can certainly include 1 or more of those in your .msi file. I have no idea whether a merge module is available for SQLXML. Sorry.

Martin
A: 

Thank you both!

I understand an installer can't run another one. I was thinking in a functionality similar to Prerequisites (in project properties). There I can check a component and it will be automatically installed if it isn't. I don't need to do anything else. But, the most important thing for me is that the installation won't run if it's not needed.

I also tried the .msm solution but couldn't find any. Maybe I can make one myself? I haven't tried it yet though.

Rafa G. Argente
+4  A: 

Looks like you need to 'chain' the installs http://objectmix.com/xml-soap/84668-installing-sqlxml-net-app.html

You can get the redist here http://www.microsoft.com/downloads/details.aspx?FamilyID=51D4A154-8E23-47D2-A033-764259CFB53B&displaylang=en

CAn you add this as a pre-req for your install? What are you using to build the create the install?

Edit:
I had a look to see how you can check of the SQLXML is installed and come across this:
http://www.tech-archive.net/Archive/SQL-Server/microsoft.public.sqlserver.xml/2005-04/msg00110.html

The system I am on just now has the following key HKEY_CLASSES_ROOT \ SQLXMLX (note the X at the end), so you might need to do a bit more investigation in to what the actual key is.

I'm not familer with Visual Studio install authoring but if you can add an entry to the AppSearch and RegLocator tables you should be able to check for the existance of the registry key when the install starts. See here
http://msdn.microsoft.com/en-us/library/aa371564(VS.85).aspx

The Reglocator table gives you the option to set a property with a value from the registry if found. You can then use this in the condition on a custom action.

A lot to put together, but I hope it move you in the right direction.

Jamie
A: 

Thanks Jaimie. I'll try to chain the installs, however I need to prevent the installer to launch if it's already installed.

That's why I wanted to implement this as a prerequisite (or something with similar functionality).

I'm using Visual Studio 2008. The project type is Web Setup Project (sorry, I should have mentioned this earlier). There's no option to include new .msi packages in the prerequisites menu. I've seen new xml files can be written and stored in a Program_Files... folder to show them in the prerequisites menu. However it seems like too much trouble for such a simple matter...

Rafa G. Argente
Updated my answer. hope it helps!
Jamie