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.
1003 questions
171
votes
6 answers

How to add a WiX custom action that happens only on uninstall (via MSI)?

I would like to modify an MSI installer (created through WiX) to delete an entire directory on uninstall. I understand the RemoveFile and RemoveFolder options in WiX, but these are not robust enough to recursively delete an entire folder that has…
Zack
86
votes
6 answers

Removing files when uninstalling WiX

When uninstalling my application, I'd like to configure the Wix setup to remove all the files that were added after the original installation. It seems like the uninstaller removes only the directories and files that were originally installed from…
pribeiro
  • 1,161
  • 2
  • 11
  • 13
69
votes
4 answers

ASP.NET MVC Pass object from Custom Action Filter to Action

If I create an object in a Custom Action Filter in ASP.NET MVC in public override void OnActionExecuting(ActionExecutingContext filterContext) { DetachedCriteria criteria = DetachedCriteria.For(); criteria.Add("stuff"); // Now I…
reach4thelasers
  • 23,986
  • 21
  • 87
  • 119
66
votes
3 answers

How to pass CustomActionData to a CustomAction using WiX?

How are properties set on CustomActionData to be retrieved by a deferred custom action?
Ayo I
  • 6,642
  • 4
  • 24
  • 37
64
votes
6 answers

How to test custom django-admin commands

I created custom django-admin commands But, I don't know how to test it in standard django tests
dixon
  • 1,165
  • 2
  • 8
  • 10
55
votes
8 answers

Run exe after msi installation?

Using Visual Studio 2008 to create an msi to deploy my program with a setup project. I need to know how to make the msi run the exe it just installed. A custom action? If so please explain where/how. Thanks.
37
votes
4 answers

How to run a ".bat" file during installation?

In a Setup project the executable files such as ".exe , .dll , .js , .vbs" are acceptable but there is no way to run a .bat file in a Custom Action. The question is how to run the *.bat files during installation?
33
votes
9 answers

Custom Action - Error 1001: Could not find file myApp.InstallState

I have tried to create a custom action for a Visual Studio Installer project to modify the permissions for a config file. The Installer.cs is as follows: public override void Commit(IDictionary savedState) { base.Commit(savedState); // Get…
CJM
  • 11,622
  • 20
  • 72
  • 114
33
votes
2 answers

Is there alternative way to access session details in deferred custom action?

I have a custom action and need to get below values for copying some parts from installation folder to VS2010 folder VS2010 directory path (VS2010DEVENV property) Installation path (INSTALLLOCATION property) To give enough privileges, I've set…
jcha
  • 599
  • 1
  • 7
  • 16
27
votes
5 answers

How do I pass msiexec properties to a WiX C# custom action?

I have an MSI file being created with Wxs 3.0. My MSI references a C# custom action, written using the new C# Custom Action project. I want to pass an argument to msiexec that gets routed to my custom action - for example: msiexec /i MyApp.msi…
David Laing
  • 7,395
  • 10
  • 31
  • 44
26
votes
2 answers

How do I fix 'Setup project with custom action file not found' exception?

I am trying to create a setup project for a Windows Service. I've followed the directions at http://support.microsoft.com/kb/816169 to create the setup project with no trouble. I want to be able to get a value during the installation in order to…
mikesigs
  • 7,762
  • 3
  • 30
  • 37
25
votes
4 answers

WiX - CustomAction ExeCommand - Hide Console

We've gotten a custom action that runs command-line to work as such:
jonathanpeppers
  • 24,837
  • 21
  • 94
  • 178
24
votes
3 answers

Mark MSI so it has to be run as elevated Administrator account

I have a CustomAction as part of an MSI. It MUST run as a domain account that is also a member of the local Administrators account. It can't use the NoImpersonate flag to run the custom action as NT Authority\System as it will not then get access to…
Ryan
  • 22,869
  • 23
  • 81
  • 126
23
votes
4 answers

How to execute a WiX custom action DLL file with dependencies

I want to create a CustomAction C# DLL file that depends on a third-party .NET DLL (in this specific case, it's MySql.Data.dll). I have the C# custom action DLL file working with the WiX fragment below. I'm just trying to figure out how to safely…
Adam Tegen
  • 23,348
  • 32
  • 115
  • 149
22
votes
1 answer

wix SetProperty After attribute won't take custom action Id

After reading the page on SetProperty and looking at as many examples as I could find here and elsewhere, I'm still not able to get my SetProperty to work with After or Before set to one of my custom action IDs. The documentation seems very simple…
idclaar
  • 648
  • 2
  • 7
  • 16
1
2 3
66 67