Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Include another MSI file in my setup project

I'm trying to make a setup program for an 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.


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 I couldn't find any. Maybe I can make one myself? I haven't tried it yet though.

like image 890
rgargente Avatar asked Nov 12 '08 13:11

rgargente


People also ask

How do I combine MSI and setup exe?

You simply add the msi and setup.exe and choose to run the setup.exe. This tool creates an SED file which you could run in a post build event so you do not have to do it manually after every build. Save this answer.

How do I fix a missing MSI file?

You can use the FixMissingMSI tool to identify MSI and MSP files that are missing from the Windows Installer cache. As an extra resolution, you can point the tool to the original media location and re-cache the missing files.

How do I add installer class to setup project?

To add a custom action click on the custom action icon. This will open the following window and there we can add a project containing an installer class. To create this project having an installer class, we can make a class library type of project and add an installer class in it from the add new item dialog.


3 Answers

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.

like image 192
Brent Rockwood Avatar answered Nov 01 '22 06:11

Brent Rockwood


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.

like image 44
Jamie Avatar answered Nov 01 '22 06:11

Jamie


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.

like image 44
Martin Avatar answered Nov 01 '22 06:11

Martin