What are the specific differences between .msi and setup.exe file? - windows-services

I searched a lot, but all are guessed answers. Help me to find the exact answer.

An MSI is a Windows Installer database. Windows Installer (a service installed with Windows) uses this to install software on your system (i.e. copy files, set registry values, etc...).
A setup.exe may either be a bootstrapper or a non-msi installer. A non-msi installer will extract the installation resources from itself and manage their installation directly. A bootstrapper will contain an MSI instead of individual files. In this case, the setup.exe will call Windows Installer to install the MSI.
Some reasons you might want to use a setup.exe:
Windows Installer only allows one MSI to be installing at a time. This means that it is difficult to have an MSI install other MSIs (e.g. dependencies like the .NET framework or C++ runtime). Since a setup.exe is not an MSI, it can be used to install several MSIs in sequence.
You might want more precise control over how the installation is managed. An MSI has very specific rules about how it manages the installations, including installing, upgrading, and uninstalling. A setup.exe gives complete control over the software configuration process. This should only be done if you really need the extra control since it is a lot of work, and it can be tricky to get it right.

.msi files are windows installer files without the windows installer runtime, setup.exe can be any executable programm (probably one that installs stuff on your computer)

MSI is an installer file which installs your program on the executing system.
Setup.exe is an application (executable file) which has msi file(s) as its one of the resources.
Executing Setup.exe will in turn execute msi (the installer) which writes your application to the system.
Edit (as suggested in comment): Setup executable files don't necessarily have an MSI resource internally

MSI is basically an installer from Microsoft that is built into windows. It associates components with features and contains installation control information. It is not necessary that this file contains actual user required files i.e the application programs which user expects. MSI can contain another setup.exe inside it which the MSI wraps, which actually contains the user required files.
Hope this clears you doubt.

Related

How to make a setup/install for remote msi

I would want to make a setup which allows to install a remote MSI package.
The trade platform that i use does not allow to download too heavy files - my MSI package is too heavy.
So i am obliged to use a "light" setup which is capable of downloading and of executing my remote MSI package.
For information my MSI package is generated from ANT file with WIX technology.
Any ideas on the way of taking itself there to make this setup ?
Thanks you in advance.
The best answer that I can give depends on some assumptions:
That you can install an agent on the client systems.
That the client is permanently connected to the internet and can get to the remote MSI file, and the same applies if it's an intra-company network situation.
If you can't download the MSI (and "push" installs don't work anyway) then get an agent program onto each client system somehow, which installs the MSI file using your HTTP:// web site as the location of the MSI file, the equivalent of msiexec /i http://server/share/package.msi
This is effectively what group policy and so on do in corporate networks, the MSI being on a share rather than an internet location.
The other alternative if you can download MSI files with your own code is again to have an agent program on the client machine that explicitly downloads the MSI to a permanent location (NOT temp internet files location) and simply installs it with MsiInstallProduct or equivalent, and "how to download a file" is an internet question rather than a Windows Installer question.

Create installer with Installshield that installs Windows Service

I have a windows service that installs itself by executing it in a cmd with the command line --install. This service also knows how uninstall itself by passing the --uninstall param in a cmd.
I need to create a MSI installer that installs this service and start it. I have tried by using Components in Installshield and using Custom Actions but not getting the rights results either way.
I need some help here. Thanks
Please see my answer under Wix installer to replace INSTSRV and SRVANY for user defined service installation
The WiX ServiceInstall and ServiceControl elements are abstractions for the underlying Windows Installer ServiceInstall and ServiceControl tables. InstallShield uses this same feature but instead of authored as XML it's authored in the components view under the advanced settings | services area of the component.
In general it's not a windows installer best practice to call a custom action to register the service. Instead figure out the details being done by the --install command and author them natively into these tables using InstallShield.
Installing, Controlling, and Configuring Windows Services

Installers binding

I have some installers like
JDK
Apache Tomcat
MySQL
MySQL GUI, etc.
I want to bundle all these installers together into a single .exe file, So that a single exe will in walk through all of the installers one by one. The result will (hopefully) make installation of many packages as painless as possible for the user.
MySQL installers were in .msi format. I converted them into .exe by using an MSI to exe converter.
I'm able to find many setup creators, but I don't think they'll do what I want. How can I bundle all of these packages together under a single installer? Is there a tool that I can use to do this?
I got some useful links http://en.wikipedia.org/wiki/List_of_installation_software , Refer this question

Packaging a custom DirectX redistributable installer

Following MS' advice we have stripped most files from the DX installer contents for our D3D9 application, getting it down to 5Mb in total.
But now I;d like to package these files into a single installer, like the redistributable installers MS themselves provide... so it can be run as part of our application install process, with /silent switch, without manually having to unpackage the files and delete them.
Is there a simple, standard way to do this so that the packaged DXSetup.exe is run?
Or is all this too complex and we should just unpack the files, run DXSetup.exe and then delete the files after installation?
Its better to use the installers that MS provide, usually is what Apps do, if the problem is space you could always use web installer its 300kb but will require the user to have an internet connection.
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en
On the other and if you're using DirectX SDK
there is a folder "redist"
and in it there are setup's of DX,
you can distribute them with your app,
and your Setup has to call the dxsetup.exe

Launching a service from msi installer that depends on assemblies installed by the msi

I'm using WiX to write a MSI installer to start a service that depends on DLLs installed by the MSI. On Vista, the DLLs become added to the global assembly cache in the MSI's InstallFinalize phase, so I can't use the built-in service starting command in WiX. That one tries to start the service before the DLLs are in the GAC, and fails. The solution seems to be to use a custom action instead [1], and run that after InstallFinalize.
The custom action I used was starting the service with sc. Everything works fine when running the installer as an administrator, but running as a regular user doesn't work. The installer will elevate privileges for the actual install phase, but will drop them after finalizing the installation, and starting the service with sc as a non-privileged user will fail. Setting the custom action to be deferred and no-impersonate to get admin privileges won't work either after InstallFinalize [2].
As a final kludge, I tried to add <Condition>Privileged</Condition> to the WiX file to tell the user that the installer needs to be run as Administrator, but I couldn't get that to work either. The Privileged value gets set to 1 during the installation, maybe when the main install sequence is given higher privileges.
So has anyone else ran into the combination of Vista, non-Administrator user, installer needs to start a service and service needs stuff that goes into GAC during installation to run? Is there any kind of working general approach to this?
[1] http://www.mail-archive.com/wix-users#lists.sourceforge.net/msg09162.html
[2] http://www.mail-archive.com/wix-users#lists.sourceforge.net/msg15381.html
This is one of those times when the easiest solution is just to schedule a reboot.
Here are a few possibilities :
If possible, do not install prerequisite assemblies in the GAC. This will allow your service to be started normally (ie between InstallInitialize and InstallFinalize).
Create a bootstrapper (a small app that launches prerequisite MSIs in a certain order). Place the prerequisite assemblies (those that go in the GAC) into their own MSI, and get the bootstrapper to install them before it installs your service.
Create a launcher (an even smaller app that just launches your MSI). Give it a manifest that will make it run elevated. That way, the entire MSI is elevated, not just the part that's between InstallInitialize and InstallFinalize. You should be able to invoke sc succesfully.
I agree with #sascha. Rebooting is not just the easiest but cleanest in this case. All of the other proposed solutions are going to set you up for a much higher failure rate in the future. IMHO, the Windows Installer design w.r.t. the GAC is busted. The reboot is recognition of that.

Resources