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

This must be helpful. Pay special attention to the bottom of the page, a guideline of 2 steps how to pass values via CustomActionData. Here is the excerpt: To write the value of a property into the installation script for use during a deferred execution custom action: Insert a small custom action into the installation … Read more

How to run a “.bat” file during installation?

Well, after much searching and trial and error I have solved this. I’m not sure if this is the best way, but it works. Here’s the scenario: I have an application I would like to deploy via a Visual Studio Setup project. In addition to my application files, I would like to create a subdirectory … Read more

How to pass CustomActionData to a CustomAction using WiX?

Deferred custom actions can not directly access installer properties (reference). In fact, only CustomActionData property session.CustomActionData and other methods and properties listed here are available on the session object. Therefore, for a deferred custom action to retrieve a property such as the INSTALLLOCATION, you have to use a type 51 custom action — i.e. a … Read more

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

The better approach is described by Phil Haack. Basically this is what you do: public class AddActionParameterAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); // Create integer parameter. filterContext.ActionParameters[“number”] = 123; // Create object parameter. filterContext.ActionParameters[“person”] = new Person(“John”, “Smith”); } } The only gotcha is that if you are creating object … Read more

How to test custom django-admin commands

If you’re using some coverage tool it would be good to call it from the code with: from django.core.management import call_command from django.test import TestCase class CommandsTestCase(TestCase): def test_mycommand(self): ” Test my custom command.” args = [] opts = {} call_command(‘mycommand’, *args, **opts) # Some Asserts. From the official documentation Management commands can be tested … Read more

Removing files when uninstalling WiX

Use RemoveFile element with On=”uninstall“. Here’s an example: <Directory Id=”CommonAppDataFolder” Name=”CommonAppDataFolder”> <Directory Id=”MyAppFolder” Name=”My”> <Component Id=”MyAppFolder” Guid=”*”> <CreateFolder /> <RemoveFile Id=”PurgeAppFolder” Name=”*.*” On=”uninstall” /> </Component> </Directory> </Directory> Update It didn’t work 100%. It removed the files, however none of the additional directories – the ones created after the installation – were removed. Any thoughts on … Read more

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

EDIT: Perhaps look at the answer currently immediately below. This topic has been a headache for long time. I finally figured it out. There are some solutions online, but none of them really works. And of course there is no documentation. So in the chart below there are several properties that are suggested to use … Read more

techhipbettruvabetnorabahisbahis forumu