0

Is it possible to create msi installer which only exctracts data but doesn't create uninstallation data?

For example:

  1. MSI has got embeded 10 files.
  2. User installs MSI which copies 10 files to user disc.
  3. MSI doesn't create uninstallation data on user computer (Add/Remove Programs shortcut etc.)
pepuch
  • 6,346
  • 7
  • 51
  • 84

3 Answers3

2

You can prevent an uninstall entry from showing in the Add/Remove programs list.

But that doesn't have much at all to do with what Windows Installer does to manage installed packages. A Windows Installer package is not a very good mechanism for delivering self-extracting, self-executing archives. There are several products made for this specifically (e.g., WinZip, WinRAR, the old Package-for-the-Web) or various non-intrusive (unmanaged) installers (e.g., NSIS, Visual Studio Bootstrapper Installer) that would give you better control over the state the system is left in.

Key point: After a successful install, Windows Installer will store loads of data about the installation on the system and manage it until it is uninstalled.

Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
  • Is it possible not to store installation data? "We need" to create self extracting msi package (client requirement). – pepuch Aug 02 '13 at 05:01
  • Two ways: (1) Fail the installation with a custom action. Windows Installer will rollback the changes it has made. Custom actions will be invoked to do the same; properly written ones do. Or (2) Uninstall after a successful installation—same general principle as a rollback. – Tom Blodget Aug 02 '13 at 09:55
  • Thanks, I'm not msi guy, can you tell me how to fail installation from wix? – pepuch Aug 02 '13 at 10:07
1

Yes. You must set the ARPNOREMOVE property.

MSDN documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/aa367591%28v=vs.85%29.aspx

Also described in this tutorial: http://wix.tramontana.co.hu/tutorial/com-expression-syntax-miscellanea/add-or-remove-programs-entries

Morten Frederiksen
  • 5,114
  • 1
  • 40
  • 72
0

Windows will create the uninstall ARP/registry information and remember that an MSI is installed when the MSI runs the PublishProduct standard action. If your MSI doesn't run the PublishProduct action (condition set to 0) then MSI can install files/registry entries/services/etc and never register itself as an 'installed' product on the machine. It basically becomes a glorified zip file.

Another way to just get files dumped onto a filesystem is to run an Administrative install of your MSI: msiexec /a foo.msi. This is like installing the MSI without registering the product or running any custom actions.

jbudreau
  • 1,287
  • 1
  • 10
  • 22