What does the EXE do in the Visual Studio setup project output - visual-studio

We are working on a winforms app in Visual Studio 2005 and the setup project we created output both an MSI and an EXE. We aren't sure what the EXE file is used for because we are able to install without the EXE.

It's a bootstrapper that checks to make sure that the .NET Framework is installed, before launching the MSI. It's pretty handy.
I suggest using something like SFX Compiler to package the two together into one self-extracting .exe and then launch the extracted setup.exe. This way you retain the benefits of the bootstrapper, but your users only download a single thing.
Edit: also see
The official line: MSDN documentation
Some bootstrapper customization: some guy's blog post about what he did

The EXE checks if Windows Installer 3.0 is present and downloads and installs it if it's not. It's needed only for Windows 2000 or older. Windows XP and newer all have Windows Installer 3.0 out of the box.
Other prerequisites, like .NET, are checked for by the MSI itself.

I think the EXE is just a wrapper/bootstrapper for the MSI in case you don't have Window Installer. If you have the requisite Windows Installer version installed then the MSI should work fine on its own.

Related

Custom installer for application in Visual Studio 2017

I need to generate an installer for my application but first I need to know if it is already installed on the system node.js, npm and other applications
Is it possible to include the installation of node.js within the installation of my application and to know if it is already installed?
I'm using Visual Studio 2017 and a WPF project for desktop applications
When the application is already installed I need to execute npm commands in the console for this reason I need to install them before or verify if they are installed correctly
I appreciate any help.
UPDATE: Advanced Installer: How to install a NodeJS web app. Really excellent videos IMHO.
Best Effort: I don't know much about Node.Js, and hence should not answer. But I haven't seen anyone else answering these questions either. Despite lacking experience, let me try to give a few suggestions.
Windows Installer: There seems to be an MSI you can use to deploy Node.Js. And there are some alternatives listed. (Essentially Chocolatey and Scoop).
Heads-Up: I have answered a more specific deployment question relating to a failed installation of the Node.Js MSI earlier: Node.js installation (windows installer) terminates prematurely on windows 10 64-bit. This may or may not be fixed.
Deployment: To deploy a prerequisite MSI before your own package installation, you can use a deployment tool capable of bootstrapping / sequencing / downloading - in other words to run several installation operations in a given sequence wrapped as a setup.exe. Or you could investigate the Chocolatey approach. With regards to the deployment tools, I am a bit tired of writing up the list of capacities these tools have and don't have. I will link to a few flavors of answers for this:
Prime Suspects:
Installshield Suite Projects - screenshot of Suite projects.
WiX Burn Bundle - beware: link overload. But there is a "Hello Burn" example. Official WiX documentation.
Advanced Installer - Prerequisites View - screenshot of view available in some project types.
One of the above tools should be able to do the job. Only WiX Burn is free and open source. Sometimes you can save a lot of time by going with a commercial tool. Obviously especially if your company already have a license for such a tool (which can be a days work to figure out).
Free Tools: In the realm of free-tools only and alternatives to WiX, some people use self-extracting archives made with 7-Zip and WinRAR and some other tools described here: Combine exe and msi file in one installer. I don't like this for security reasons and other reasons as explained in the link.
Simplicity: For corporate deployment a simple batch file or some custom construct distributed via your deployment system (SCCM, etc...) could suffice. Or even a zip with an embedded batch file to kick off your zipped installers in sequence could work. All depends on your scenario. I wouldn't roll with such an approach for global distribution.
And here are several other answers where I describe available deployment tools:
How to create a MSI file which simply copies a directory to Program Files?
Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable
Some Links:
Create MSI from extracted setup files
Error Creating a 7-zip installer package
How to create windows installer
What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc
Nodejs - Another installation is in progress

“MSVCP100.dll is either not designed to run on Windows or it contains an error”

I built an application in C++ using Visual Studio 2010 Express. When I tried to run it on a certain computer today I got this error:
MyApplication.exe - Bad Image
C:\Path to My Application\MSVCP100.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support.
The DLL mentioned is one of the Visual C++ Redistributable DLLs. My application’s installer used to launch Microsoft’s installer for those DLLs but I recently tweaked it just to install msvcp100.dll and msvcr100.dll alongside my application. The new way worked fine on a handful of other computers, though I can’t rule out the possibility that that was only because the DLLs had already been installed at system level on those other computers.
What is causing this sudden DLL mismatch?
That's STATUS_INVALID_IMAGE_FORMAT, the Machine property in the DLL header doesn't match the architecture of the application.
Do keep in mind that you are likely to have two copies of this DLL on your build machine, the x86 and the x64 version. Later versions of VS have a 3rd copy, the ARM version. So very high odds that you picked the wrong one. Usually you'd target x86, the one you tested your program with is stored in the c:\windows\syswow64 directory. The 64-bit version is in c:\windows\system32.
How these directories got these seemingly backward names is a story for another day :) Favor using the vc/redist subdirectory of the VS install directory as a source for the copy, it is less ambiguous.
This .dll file is related to the Microsoft Visual C++ 2010 Redistributable x64 Package.
Try removing the Microsoft Visual C++ 2010 Redistributable x64 Package by using the Add or Remove Programs item in Control Panel.
Then, install the latest version Visual C++ (file name= vcredist_x64.exe) from the site:
http://www.microsoft.com/en-us/download/details.aspx?id=26999
Hope that helped..
If all above suggested solutions not worked for you than download MSVCR100.dll 32 bit or 64 bit as per your system configuration.
Download DLL from below link
https://www.sts-tutorial.com/sites/downloadCenter.php?MSVCR100
Follow da steps
1.Download the dll from here
https://www.sts-tutorial.com/sites/downloadCenter.php?MSVCR100
2.open with winrar
3.Extract MSVCR100.dll to C:\Windows\System32
hope it will work c:

Using inno to install MS DHTML components on Windows Vista and later

2 files required for the MS DHTML control to work properly were removed from windows vista (and win7, 8 presumably) for security reasons.
These are the DHTMLED.ocx and TRIEdit.dll.
Microsoft now supply a downloadable msi file, dhtmled.msi, which will install and register the 2 components into the following directory:
%windir%\Program Files\Common Files\Microsoft Shared\dhtmled\
I would like to build this into an inno script.
Should I run the installer on my machine first to get hold of the ocx and dll files and have separate lines for each in the inno script or should I incorporate the msi file into the script?
Also what flags should I use to prevent installation on win xp or earlier and when the files are already present?
Thanks
See Replacing the DHTML Editing Control in Windows Vista and Beyond
For new applications, you can ship the installer as part of your product (with appropriate licensing) and chain to it from your own installer. The installer can be run silently and without adding an item to the installed-programs list in Windows. (For details, see the documentation for MsiExec.exe.)
However, we recommend that the installer allow the DHTML Editing Control to be added to the installed-programs list. In addition, when your application is uninstalled, do not uninstall the control; instead, allow customers to uninstall it separately if they want.
Note that this method of installation does not provide logo-compliant installation.
The method that is compliant would be to list this as a prerequisite that the user manually installs before running your installer.
I haven't seen anything the permits redistribution of the naked libraries under any circumstances.

Windows Installer: Specifying the install order of prerequisites

I am using the Windows installer that comes with VS2010. This app uses .Net4 and will mainly run on xp machines. It also uses some third party assemblies that require .Net2.
If the pc is using XP SP2 I also need to install Windows Imagining Components.
Selecting .Net2 in the prerequsites will not install WIC and will try to install .Net2 on Windows 7 which casues an error.
If I check the .Net3 SP1 prerequisite this will include .Net2 and WIC. Unfortunately when the installer runs it first tries to install framework 4 before framework 3.5.
Is there a way of changing the order of the prerequisites so that 3.5 is installed before 4?
Here is the method to add WIC to your prerequisites list.
Quoted from above link:
"create a custom MSI Bootstrapper Package for WIC -and- add it as a dependency for the standard .NET bootstrapper package
I've created the bootstrapper and patch for the standard .NET bootstrapper which comes with VS.
Download this self-extracting archive , unpack to %PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages, and you're ready to go.
If everything is OK, you should see "Windows Imaging Component" in ClickOnce Prerequisites window. Add it to your project, and it should install fine from now on"
This may solve your problem, because if you select it in the list it will be installed before .Net 4 and there is no need to install .Net 2 beforehand.

How to create MSI package, which can install Windows installer itself

Is it possible to create MSI package, which will run without Windows installer installed in system, but first will install Windows installer itself, and then continue installing other components?
The goal is to create prerequisite package for our software, which must install some components, including some operation system service packs. We also prefer using MSI package. But it's obviously to us that our software will be installed on clean operation system. Though there will not be needed Windows installer present. Is it possible to create such prerequisite package using MSI?
No, there is no way to install an .MSI package without Windows Installer already being present in the OS.
However, Windows Installer has been a native part of Windows since Windows 2000. Are you really developing installers for Windows 95/98/NT4? That would be the only case where there is no Windows Installer support and you'd need to install a redistributable MSI package first.
Unless you meant to say that you require a higher version of Windows Installer than is native to one of the older OSes? (e.g. MSI 3.1 for WinXP) In that case, you'll need to bundle the .MSI redistributable for the MSI package you desire and run that first. Sometimes a reboot is required, other times not. YMMV.
One way, you can write an application in cpp or c or any language that does not require any additional frameworks or SDKs, to check for the installer and install it programatically.
It sounds like you need a bootstrapped with two or more msi files in it. Take look at the WiX documentation. WiX has build-in bootstrapped
Hope this helps
s

Resources