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.
Related
I have C# desktop application created in Visual Studio.
I need to have one executable file, which I can run anywhere. Without compiler or need of having folders of libraries. The .exe file I have in project folder doesn't work alone.
Thanks
Create installable file using any third party software i.e Advance Installer to send your project anywhere.
If it's a .NET application executable then YES you can send it anywhere and run it anywhere having just one file; provided the fact that wherever or whichever machine you are trying to run it; have .NET Framework installed.
Else, you should create a self extracting installer which will not only include the executable but also will have the framework executable. That way wherever you run the installer will first install the framework and then you can run your exe without any trouble.
Currently, our customer uses a Windows .bat file in order to batch-install a series of installers (currently .exe files produced using Inno Setup, although there are plans in the future to replace them with .msi installers) found in a directory.
However, they have requested that this be replaced with an .msi file -- it sounds crazy to me (as it doesn't actually INSTALL anything, merely search for external files already on the target machine and then run them) -- but presumably it is in order to take advantage of Windows Installers' logging functionality, as well as to prevent unauthorized tampering with the installation process.
Most of the stuff I've found on Windows Installer custom actions seems to refer to running programs installed by the MSI, not programs that were already on the target machine before the installer was run. What do I need to do to run already-existing files (in the same directory as the MSI itself) as part of an MSI's processing?
I'll accept solutions using either Visual Studio or WiX.
My problem is the following:
I have multiple applications that I want pack in one installer so when the user runs it, they will be installed automatically instead of installing or copying each single application.
I have a program that's already a setup file (.exe) and two .exe files which can be executed manually and do not need an installation. So what I want is:
Build an installer so when the user opens it - the .exe file of the setup program gets installed and the other applications which dont need to be installed will be copied somewhere in a path.
Whats the best solution?
I think you need a packaging programs to create an installation package, such as:
AdvancedInstaller
InstallShield
InstallAnyware
The first two of them have a freeware version. Maybe you can see if the required features are available in the freeware version.
I would suggest Advanced Installer (allows easy chaining of installs) if you have no significant deployment experience. Otherwise I would suggest Wix and its "Burn" feature (ability to chain installers in sequence). Please read the following answers for context:
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
Windows Installer and the creation of WiX
Wix to Install multiple Applications
Read this if you want to get going with Wix quickly
I'm trying to create an installer in VS2010.
My situation is: I have 2 app, during installing a application, I need to check if the other app exists or not. If it exists, just install the first app, otherwise install both of them. How can I do this in VS2010. I've searched and find a solution here. But I don't know where I can put these codes.
Any instruction in details would be appreciated.
Thank you.
You probably will want to look into creating a Custom BootStrapper
From above link:
The Setup program is a generic installer that can be configured to detect and install redistributable components such as Windows Installer (.msi) files and executable programs. The installer is also known as a bootstrapper. It is programmed through a set of XML manifests that specify the metadata to manage the installation of the component.
The bootstrapper first detects whether any of the prerequisites are already installed. If prerequisites are not installed, first the bootstrapper shows the license agreements. Second, after the end-user accepts the license agreements, the installation begins for the prerequisites. Otherwise, if all the prerequisites are detected, the bootstrapper just starts the application installer.
I have .net 3.5 application
I have made basic MSI installer with installshield added .net 3.5 in Redistributables tab rebuild and checked .msi and .exe but size is same .net only added in ISSetupPrerequisites folder
Installshield does not put Redistributables in .msi?
I must send full folder (DiskImages) to my clients?
their would be no points in putting the redistribuable in the MSI since you cannot launch another msi while an msi is runing.
a good practice would be to compressed all your files in the setup.exe. it's easier to carry around and prevent anyone from replacing them with nasty stuff and launch them with admin's right.
right click on the prerequisit and open the properties
Now specificly for the .net 3.5, since it's a windows feature on most of the modern OS (anything but xp...) the installation of the module will failed. I would suggest making a launch condition validation the presence of the registry key HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5|Version. like that
it will make your installer smaller and probably more usefull since you can customize the error message to explain how to activate it.
You can compress everything into the .exe file (select compressed, and "extract from setup.exe" as appropriate), but since Windows Installer does not handle prerequisites, it cannot be just the .msi file.
If you stick to the uncompressed build you described, then yes, you must send the full contents of at least the Disk1 folder (also any other Disk folders if there are any; they're typically only used for multiple-disk media scenarios).