PDA

View Full Version : How to: Use a Visual Studio Dependency Bootstrapper instead of SUF Modules


batkin
06-24-2009, 03:47 PM
Being new to SUF I was running into issues using the Dependency Modules. I found they did not work as I expected and wished I could use the bootstrapper that Visual Studio produces to check for dependencies.

After some testing, I found out I could. Here's how I did it:

1. Create a new Setup Project in Visual Studio

2. Set your Prerequisites as you normally would

3. Build your Setup Project, which produces an exe (bootstrapper) and an msi (your installer). For this example these will be called setup.exe and setup.msi

4. Delete your newly created msi file. Open notepad and save a blank text file using "Save As" (very important, Save As lets you change the file extension)

5. Use "Save As" and save as "setup.msi" (or whatever you named your project)

6. Now you have a setup.exe (real bootstrapper) and a setup.msi (which is really just a blank text file)

7. In SUF, add both of these files to your Primer Files.

8. In your Actions screen add the following code to the "On Startup" section:
Shell.Execute("%TempLaunchFolder%\\setup.exe", "open", "/passive", "%TempLaunchFolder%", SW_SHOWNORMAL, true);

That's it. The command line argument "/passive" should suppress the error message that the msi file is not valid, yet still show the prompts letting the user know certain dependencies are required.

I just did a build that required .NET 3.5 SP1 and Crystal Reports for VS2008 and this method worked like a charm.

;)

fastburst
09-02-2009, 06:33 PM
Many thanks, I just spent the last 8 hours researching and looking on line for this trying different things. I did your method and bam not even 30 seconds of work. All done works perfectly.

WHAT A LIFE SAVER!
:yes