Questions tagged [custom-action]

A custom action is custom code provided by a developer to be called during a Windows Installer setup. Windows Installer tools (such as WiX, Visual Studio Setup Projects, InstallShield, Wise, Advanced Installer and so on) provide support for incorporating custom actions into your Windows Installer setup.

A custom action is most often custom code called from a Windows Installer setup (an MSI file). Most tools (such as WiX, Advanced Installer, InstallShield, Visual Studio setup projects) provide support for calling custom actions. There are several types of custom action in Windows Installer setups:

  1. Setting a Property (although called a custom action this type 51 one doesn't run user-provided code).
  2. Setting the location of a Directory.
  3. Running embedded VBScript or JScript code.
  4. Calling an external VBScript or JScript file.
  5. Calling a method from a C++ DLL.
  6. Running an executable.
  7. Sending an error that stops the install (a type 19 custom action that doesn't run any user-provided code).
  8. Managed code custom actions called with Visual Studio's installer class mechanism.
  9. Managed code custom actions called via the DTF mechanism, in most cases from WiX-generated setups.
1032 questions
11
votes
3 answers

How can I get the return code from a CustomAction?

I have the following CustomAction in my project:
fredley
  • 32,953
  • 42
  • 145
  • 236
10
votes
1 answer

WiX custom action using CAQuietExec fails with invalid command line error

I have a custom action that requires elevated privileges. The purpose of this custom action is to run sc.exe and remove the service triggers for a service that ships with Windows (w32time). Here are the snippets of significance:
skiloup
  • 103
  • 1
  • 4
10
votes
2 answers

Custom action on uninstall (clickonce) - in .NET

For a .NET application installed using ClickOnce, is there any way to run a custom action during the uninstall process. Specifically, I need to delete a few app related files (which I created on first run) and call a web service during the…
Sameet
  • 2,191
  • 7
  • 28
  • 55
9
votes
10 answers

Custom Installer in .Net showing Form behind installer

[RunInstaller(true)] public partial class Installer1 : Installer { public Installer1() { InitializeComponent(); } public override void Install(System.Collections.IDictionary stateSaver) { …
Manoj Savalia
  • 1,402
  • 3
  • 13
  • 36
9
votes
2 answers

Wix Custom action set value from CA to wix

In deferred ( with impoersonate = no) to send the Value to the WIX to CA, i am using set property and value and collecting the data in CA using session.CustomActionData["key"]; Is there any way to send back the data to the WIX from CA
asvignesh
  • 787
  • 2
  • 6
  • 32
9
votes
3 answers

How do I show Error Message using Managed Custom Actions with Windows Installer

I am writing a managed custom action. I am using the DTF Framework from Windows Installer Xml to wrap the managed dll into a usable CA dll. The CA does what it is supposed to, but I am still having trouble with error handling: Dim record As New…
Mephisztoe
  • 3,276
  • 7
  • 34
  • 48
9
votes
7 answers

Unable to run Wix Custom Action in MSI

I'm trying to create a custom action for my Wix install, and it's just not working, and I'm unsure why. Here's the bit in the appropriate Wix File:
Nathan
  • 1,591
  • 4
  • 17
  • 22
9
votes
4 answers

Is it ok to schedule RemoveExistingProducts custom action before InstallValidate?

Problem I have an MSI that creates and starts a Windows service during installation and stops and removes the service during uninstallation. This works fine when installing and uninstalling by itself, but when upgrading, the Files in Use dialog is…
Kevin Kibler
  • 13,357
  • 8
  • 38
  • 61
9
votes
1 answer

WiX - commit more than one Property to deferred Custom Action

I have a problem with my WiX installer in contact with deferred / immediate custom actions. Please excuse my english. I want to surrender some properties, entered by the user, to a deferred custom action. I know that I need a immediate custom action…
Schneckschjen
  • 169
  • 2
  • 11
9
votes
1 answer

Inserting Custom Action between Dialogs (InstallUISequence) in WiX

I have two custom dialog boxes (plus the required ones ExitDlg, FatalErrorDlg, etc.), the first one sets a property using an Edit control and the second one shows this property using a Text control. Here is the meaningful code:
Marlos
  • 1,927
  • 2
  • 22
  • 44
8
votes
2 answers

Error 1001 using custom installer with Visual Studio 2008

I've created a simple winforms app and a custom installer. It all seems simple enough but I get the following popup and error details in the event log. The description for Event ID 11001 from source MsiInstaller cannot be found. Either the…
TeamWild
  • 2,460
  • 8
  • 43
  • 53
8
votes
2 answers

WiX 3.5 Install Service from Heat, Need from Custom Action?

I have a VS2010 WiX project with a main .wxs file and an empty .wxs file. The empty .wxs is overwritten in the prebuild event of the project, using heat.exe to harvest everything from a console exe. The exe has InstallUtil hooks, and in the days of…
Snowy
  • 5,942
  • 19
  • 65
  • 119
8
votes
2 answers

Perform Custom Action Based on Mode - WIX

We have created WIX installer for our application. Problem we are facing is: We have defined two different custom action (say ActionForInstall and ActionForUninstall) that we want to perform in following case: ActionForInstall : Should run while…
vrajs5
  • 4,066
  • 1
  • 27
  • 44
8
votes
2 answers

Visual studio Installer Issue : Error 1001. Error 1001. InstallUtilLib.dll: Unknown error

There are lot of threads and question out there. But the error I am facing is in quite different scenario. So let me explain here. With the help of this article Installer Class and Custom Actions I have added project primary output(Having Installer…
8
votes
1 answer

How to run custom action based on condition?

I'm trying to run a custom action (delete a certain file) based on the windows version. I know how to check for the windows version: =…
Facy87
  • 145
  • 1
  • 2
  • 11
1 2
3
68 69