Create Exe Installer

Active2 years, 2 months ago
  1. Run Install Exe

Creating an installer within your existing Visual Studio project Start by adding an installer project by right-clicking on your solution folder and choosing Add - New Project: Then in the Add New Project dialog choose Visual Studio Installer and Setup Wizard. Installutil.exe (Installer Tool) The Installer tool is a command-line utility that allows you to install and uninstall server resources by executing the installer components in specified assemblies. This tool works in conjunction with classes in the System.Configuration.Install namespace. This tool is automatically installed with Visual Studio. Nov 23, 2018  For example, some will take /S for an unattended install while others take /quiet. Probably the easiest way to handle this is if you tell us what.exe you are trying to install and how you want the batch file to handle the installation process. Are you wanting a silent install? Are you trying to pass installation options to the installer?

I want to create an installer EXE with some specific properties:

  1. it should be a single exe file
  2. it should be robust (i.e. the technique should be known to work well on any Windows system)
  3. it should create only a single file (a .scn screensaver file) in %systemroot%
  4. it should add the option to uninstall that particular file in 'Control Panel -> Add or Remove Programs' but without creating any new entry C:Program Files or copying an uninstaller.exe somewhere.

I've seen installers that work like that - so how to do this?

Peter Mortensen
14.5k19 gold badges89 silver badges118 bronze badges
MatMat
3,7939 gold badges37 silver badges46 bronze badges

13 Answers

As you've said it can be an MSI, I'd suggest going down that route.

You could play around with installer projects in Visual Studio (if you have it; I'm not sure if the Express editions support making installers), as they'll quite happily produce an MSI that will do what you're asking. It's worth noting they'll produce an EXE and an MSI, you only need to distribute the MSI though.

Failing that, take a look at Windows Installer XML (WiX) as that will let you hand sculpt an MSI that does exactly what you want it to do and will cater for all five of your points above.

Note: Using an MSI will mean that you'll need to have Windows Installer on the machine you're installing to - It's in-box from Windows 2000/ME upwards.

RobRob
38.6k22 gold badges105 silver badges134 bronze badges

Take a look at NSIS it is quite simple and it is used to create installers for Windows.

Otávio DécioOtávio Décio
64k14 gold badges147 silver badges215 bronze badges

I've heard good things about the free installer Innosetup, and the website says it can create single EXE installs.

MarkJMarkJ
28k4 gold badges56 silver badges97 bronze badges

Try Advanced Installer, I think it can do all that you ask. I use it for slightly more complex installers but the free version is easy to use and powerful.

There can be an issue with MSI files, older PCs don't have the latest Windows Installer, 3.1, so you need to install that or prompt the user to, first! Have you looked into using IExpress if you just want to copy a file across?

MartinMartin

IExpress

You can use Microsoft Windows's built in installer wizard called 'Iexpress'. To access that, open 'Run', which is done by hitting Windows Key and R at the same time(WindowsKey+R). When you get in 'Run', type in the little box 'iexpress.exe'. Then hit enter. You are there!

Notes: Only available on Microsoft Windows (Legit, and NonLegit)

Setup Explained:
Page 1
- Create a Self Extraction Directive file.
Makes a new installation file
- Create a Self Extraction Directive file.
Edits a .SED file
Page 2 (Of Create a Self Extraction Directive file.)
- Look in the 'Description' at the bottom
Page 3
- Package Title
The name of your installer, as displayed at the top
Page 4
- Confirmation Prompt
What to tell the user before installing
Page 5
- License Agreement
Skip if you don't know what this is
Page 6
- Packaged Files
What files you need to install
Page 7
- Show Window How the window is displayed
Page 8
- Displayed At TopPage 9
- Package Names and Options Where to save your File- Hide File Extracting Progress From User Hides the animation- Store File using Long Name inside installer Ignore if you don't know what this isPage 10
- Displayed At Top
You are done!
Click on the Title to download the file, without doing those instructions. If it is a virus, got infected or you think it is a virus, feel free to delete the file.

Create Exe Installer
MineCMDMineCMD

Both NSIS and Inno Setup will cope with all the tasks specified. Inno Setup uses a Pascal-like language for its scripts, NSIS uses its own script language.

Peter Mortensen
14.5k19 gold badges89 silver badges118 bronze badges
justadreamerjustadreamer
1,6432 gold badges17 silver badges24 bronze badges

NSIS is the way to go, very simple to learn, just write a simple file specifying which files you want to install over where. You can also add QuickLaunch options and so on. Then run the NSIS compiler and you get the exe.

NikhilNikhil

InstallShield has a release option called 'Single .EXE'. It can bundle the payload inside, plug register w/Add-Remove Programs as you specified.

William LearaWilliam Leara
9,4613 gold badges31 silver badges55 bronze badges

The not copying an installer somewhere and adding an entry into Add/Remove seem to be counteractive. My understanding is that add-remove programs neccesarily references a copy of the uninstaller that resides in a Windows directory (so it doesn't lose access to it).

Perhaps you could have the screensaver double as an uninstaller if you pass it some sort of command-line option. Then simply tell the msi that the uninstaller IS the screensaver (hence no unnecessary coping to some other directory.)

Peter Mortensen
14.5k19 gold badges89 silver badges118 bronze badges
Ape-inagoApe-inago

You can create a single installer file using just Visual Studio 2017 Pro and Windows in 3 steps:

  1. To have an entry in the Add/Remove Programs, you need to have asetup project.
  2. The setup project may compile into 2 files: *.msi andsetup.exe
  3. To create a self-extracting package, you can use theIExpress tool
user8228677

NSIS, MSI any installer can do that for you.

NSIS is pretty small and compact.

dr. evildr. evil
17.5k26 gold badges115 silver badges194 bronze badges

If you want to use standard deployment methods with your installer you probably should stay away from NSIS. See http://unattended.sourceforge.net/installers.php for an overview.

ko-dosko-dos
Max09

Run Install Exe

Not the answer you're looking for? Browse other questions tagged windowsinstaller or ask your own question.