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
21
votes
8 answers

Custom Action in C# used via WiX fails with error 1154

I am using WiX 3.5.1930 in Visual Studio 2010, targeting the .NET Framework 3.5. (Later weekly builds of WiX seem to be very broken with respect to their custom action template, at least for now. 1930 is the most recent build that seems to make a…
MikeBaz - MSFT
  • 2,938
  • 4
  • 28
  • 57
19
votes
2 answers

How can I perform a custom action in WiX that only executes on install or uninstall?

I have two custom actions, one of which I'd like to execute when my product is installed and the other when it is uninstalled. My custom action is currently called from a merge module after the "InstallFinalize", but this happens for both install…
17
votes
2 answers

WiX Action Sequence

I was looking for list of actions and their sequence when running a WiX setup. Somehow the official website doesn't seem to provide any information. The basic problem is that I want to schedule my custom actions correctly. Typically I need to…
Damian Vogel
  • 1,050
  • 1
  • 13
  • 19
17
votes
2 answers

How to pass parameters to the custom action?

I'm trying to create a custom action with "Value" attribute, I want to pass parameters to the C# code (the TARGETDIR and the version). However, I get an error stating that DLLENtry and Value cannot coexist. But the custom action without dllentry is…
Ehud Grand
  • 3,501
  • 4
  • 33
  • 52
16
votes
6 answers

MSI Installer cannot find InstallState when using custom action with parameters

First off, yes, I know that the VS Setup Projects are evil. It's what I have to work with. I've also seen several related questions, but they either go unanswered or they don't match my situation close enough for the answer to work (or they harp on…
KeithS
  • 70,210
  • 21
  • 112
  • 164
16
votes
1 answer

WiX: How to execute a command line command after installation

I need to register an HTTP port after installation, but I guess this could be abstracted to generally executing any command line command. Here's what I've got so far:
Weatherman159
  • 565
  • 1
  • 4
  • 9
15
votes
3 answers

Rails 3 Form For Custom Action

I'm having trouble routing a form to a custom action in Rails 3. Here are my routes: resources :photos do resources :comments collection do get 'update_states' end member do put 'upload' end end Here's the…
Andrew
  • 42,517
  • 51
  • 181
  • 281
14
votes
1 answer

WiX CustomActionData is empty in called CustomAction

once again I'm stuck at a problem, that is probably easy to solve. I want to extend a setup, created with WiX, to make changes in the configuration file of the installed program. In order to do this I've created a CustomAction. To be able to change…
Skalli
  • 2,707
  • 3
  • 27
  • 39
14
votes
3 answers

Using a WiX custom action to set a property's value

I am modifying an existing WiX installer to handle updating an existing installation of one of our products. There are several values whose defaults are specified in properties. These properties are displayed to the user for editing and are then…
Tony Vitabile
  • 8,298
  • 15
  • 67
  • 123
14
votes
2 answers

How to call custom action after files copied in wix

I want perform custom action after files are copy in destination folder. In custom action i run copied script file so give me error file not found.
Rikin Patel
  • 8,848
  • 7
  • 70
  • 78
12
votes
3 answers

Error 2896 using a WiX C#/.NET 4 custom action

I am trying to use my first custom action in WiX and I get: error 2896: Executing action CustomActionTest failed. I am using Visual Studio 2010, WiX 3.5, 64-bit Windows 7 Ultimate, .NET Framework 4. Here are what I think are the relevant…
KnightsArmy
  • 680
  • 1
  • 6
  • 12
11
votes
1 answer

Looking for a build activity which breaks a build when new warnings are introduced

We're attempting to clean up a big bunch of brown field code, while at the same time a team is adding new functionality. We'd like to make sure changed and new code is cleaned from any compiler/code analysis or other warnings, but there's too many…
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
11
votes
2 answers

change installer properties in C# custom action

How to change installer properties in my C# custom action?
Bogdan Verbenets
  • 25,686
  • 13
  • 66
  • 119
11
votes
1 answer

Private key of certificate in certificate-store not readable

I think I've got the same issue like this guy, but I wasn't as lucky as him/her since the solution provided doesn't work for me. The solution provided looks for files on the C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys (not in sub directories)…
GameScripting
  • 16,092
  • 13
  • 59
  • 98
11
votes
2 answers

C# custom action in Wix

When my application is uninstalled, the server needs to be notified so that it can free up the license key assigned to the client. This is done via a web service call. I created a C# custom action that does this. The problem is, the uninstaller is…
Amith George
  • 5,806
  • 2
  • 35
  • 53
1
2
3
68 69