Creating setup project with single output file (Visual Studio 2005) - visual-studio

I'm using visual studio 2005 Setup project to create an installer for my application.
The outputs of the setup projects are:
- Setup.exe (a bootstrapper which makes installed .Net framework if it doesn't exist)
- .Net framework folder (for installation by the .exe above)
- .msi installation for my project (called by the setup.exe)
My question is:
Is there any way I can have a single .exe (or msi) installation which makes the entire
installation (and encapsulates all the functionallity menationed above) ?

It seams that the Visual Studio installer doen't let you create a single installation file.
I finally decided to use Win-Zip self extractor to create a single installation file which extract all of the above files and run the setup.exe

I'm currently using visual studio standard setup and then combining the exe and msi with Make SFX since it supports command line (for automatic builds) and is free.

SFX Compiler is a free program that will create self extracting .exe files for you.

Related

How to add msi file to Installshield Project?

I am using Installshield 2015 with Visual Studio 2013. I created a setup.exe for my application. In order to start my application, user needs to run SpeechPlatformRuntime_x86.msi or SpeechPlatformRuntime_x64.msi.
How can I add these msi file into my project so after installation finishes, it automatically run msi file?
These sound like they provide dependencies. Since you deliver a .exe file, I would suggest creating a prerequisite and including it in your project. This will result in them being installed first, and your main .msi (or InstallScript) project contents will follow.
(If you delivered only a .msi file, you would probably have to document your dependency. You could look into the Chained .MSI Packages support, but it's not really that well suited for handling dependencies.)

Mix local and download prerequisites in deployment project

According to the question Bundling only part of the prerequisites with ClickOnce a ClickOnce installer can either download ALL prerequisites from the web or expects ALL of the files locally. This seems to be the same for a Visual Studio 2008 deployment project.
As I would also prefer to include only selected prerequisites in an installer archive I was wondering if this is really still state of the art. Will upgrading to Visual Studio 2010 solve this issue or is there any workaround that I overlooked?
So here's an idea that I came up with.
Package the bootstrap installer with all prerequisites except the
.NET framework with "Download prerequisites from the component
vendor's web site" set
Create a small program (batch file or
executable) that is launched instead of the bootstrap installer which
does the following
Check if .NET framework is installed (the bootstrap package files tell you how to check this, e.g. .NET framework is installed if
HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033\Install ==
1)
If yes execute setup.exe -homesite=false which configures the installer not to download any files
Execute setup.exe
Comments welcome!
You can package the prerequisite and set a download URL and put the prerequisite there. Then when the prerequisite is installed by the bootstrapper, it will download it from the URL instead of having to include it in the deployment package. This means, of course, that you have to set up your own bootstrapper package every time you want to do this, but it does work.

Modify visual studio's SQL Express Bootstrapper

I know there are ways of installing SQL Express from the command line. This link gives an example of that. There is another example in here..
When I make this change in my application:
then when I deploy my application and install it on a computer that does not have that prerequisite I notice that the installer downloads that prerequisite:
If I cancel the installation and then launch the exe file that the installer downloaded then I will see:
If I do not cancel the installer, I believe that the installer then goes ahead and installs SQL Server Express with a technique similar to the one posted by the first two links link 1, link 2.
Where does Visual Studio stores the parameters that are being passed to the exe that it downloads in order to create a silent install? will it be possible to modify those parameters that are being passed to the exe? also I know which file (prerequisites) did visual studio (installer) downloads because I found it on the computer when installing my application but how can I tell from what link does visual studio downloads the prerequisites? I know it depends on the OS version and architecture of the operating system where the application is being installed.
Anyways I am just curious about the last paragraph. In short, I just want to modify the parameters that are being passed to the prerequisites of SQL Server Express 2008. Those parameters should be somewhere in the application that I deployed. Or maybe they get downloaded from Microsoft.
On a 64-bit machine the SQL Server Express bootstrapper is typically located in the following folder:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\SqlExpress2008\en
Look inside the package.xml file for the command line parameters for the installer.

Why Visual Studio creates .exe installer files?

when I build solutions in Visual Studio, that generates installer files as .exe and .msi, .exe files are useful for what?
The .EXE file that is created by the installer project is a bootstrapper for the .MSI setup file. It is used to launch the .MSI setup file.
Generally, both will launch the setup program and allow the user to install the application. However, sometimes the setup.exe file will run a custom validation routine to determine if the user's computer meets the minimum requirements for installing the software.
For example, if the user does not have Windows Installer, they will not be able to launch the .MSI file, but the .EXE application will still run and inform them that they need to install Windows Installer first. For .NET applications specifically, the .EXE file verifies the presence of the appropriate version of the .NET Framework, and if it is not present, it prompts the user to download and install it.
You can customize the prerequisites that are required for your application in your installer project using Visual Studio. See these MSDN articles for details on how to do that:
http://msdn.microsoft.com/en-us/library/ms165429(v=VS.100).aspx
http://msdn.microsoft.com/en-us/library/7eh4aaa5(v=VS.100).aspx
Others have commented on the how (.exe bootstraps the .msi) but part of the reason why is that users know that .exe files are the things you run. I don't think your average user knows that .msi files are something that you can click on to install an application.
The .exe file is made for installing the prerequisites of your application.
Let's say your application uses the .Net 3.5 framework, you can tell the installer project to include the installation of the needed libraries if they're not already installed.
You may also deactivate it, so only the .msi is being created.
This page shows how to activate and configure the prerequisites setup, just uncheck the checkbox in order to deactivate it.
You also find more details on the process of Bootstrapping on MSDN:
the capability to automatically detect
the existence of components during
installation and install a
predetermined set of prerequisites
.exe files are useful for executing your programs that you've just built in Visual Studio, assuming you're not doing web applications.
Pretty much every Windows program out there is executed using files with an .exe suffix.
Installer exe files are normally just the msi wrapped in a bootstrapper. The bootstrapper can do anything, but normally its purpose is to ensure the user is running a sufficient version of Windows Installer, then extract the msi and invoke msiexec.exe to start installing the msi. Generating installers as exe's is deprecated these days, but some still do it.

Location of files from extracted installshield setup.exe

I have a Installshield Basic MSI project. This project uses Installshield's bootstrapper to install several setup prerequisites. Everything is bundled and compressed inside a single exe (Setup.exe). I have one prerequisite that needs to know the the full path of the file to execute. Is there a property available to find this path?
Or another solution. We are using Installshield 2008 with not much chance of upgrading at the moment. I am needing to install SQL Server 2008 which is dependent upon Windows Installer 4.5. Installshield 2008 doesn't have support for WinInstaller 4.5 so I created prerequisites for it for WinXp and Vista. I have WinXP working correctly.
However Windows Vista, the redistributable for Windows Installer 4.5 is a .msu file and needs to be executed through wsua.exe. I created a small app that just accepts the commandline params and kicks off wusa.exe with params to install the Windows Installer redistributable. However wusa.exe needs the full path to the redistributable. Is there a way to find the path to where setup.exe extracted the files?
Or is there a way to add support for Windows Installer 4.5 to Installshield 2008, doubt it, but it would be easiest
For your alternate approach with IS2008, you should be able to do this in your helper exe. Assuming you're using C++, you can call GetModuleFileName() to find the location of your running exe (other languages should expose similar functionality somewhere). Since all the prerequisite's files will have been extracted to the same folder, you can use this to figure out the full path for the .msu file as well.
Upgrading will get you direct support (as well as included prerequisites for Windows Installer 4.5) as IS2009 and later prerequisites shell execute their target, supporting .msu files natively. IS2009 and later also have support for a prerequisite command-line property which you could use to locate your prerequisite files; see the InstallShield 2009 Release Notes and search for ISPREREQDIR.

Resources