custom-action

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

拥有回忆 提交于 2019-11-27 02:38:46
问题 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 buildable C# CA with working references.) I have two custom action assemblies written in C#. One of them works fine. The other fails with the following error: CustomActionnNameHere returned actual error code 1154 (note this may not be 100% accurate

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

为君一笑 提交于 2019-11-27 00:17:41
问题 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 network resources. On Vista/2008 with UAC enabled if NoImpersonate is off then it will run as the executing user but with the unprivileged token and not get access to local resources such as .installState. See UAC Architecture Anyone know of a way

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

放肆的年华 提交于 2019-11-26 23:54:45
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<Person>(); criteria.Add("stuff"); // Now I need to access 'criteria' from the Action..... } is there any way I can access the object from the Action that is currently executing. I would recommend putting it in the Route data. protected override void OnActionExecuting(ActionExecutingContext filterContext) { filterContext.RouteData.Values.Add("test", "TESTING"); base.OnActionExecuting(filterContext); }

Custom Installer in .Net showing Form behind installer

非 Y 不嫁゛ 提交于 2019-11-26 23:22:44
问题 [RunInstaller(true)] public partial class Installer1 : Installer { public Installer1() { InitializeComponent(); } public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); } private void Installer1_AfterInstall(object sender, InstallEventArgs e) { Form1 topmostForm = new Form1(); topmostForm.BringToFront(); topmostForm.TopMost = true; topmostForm.ShowDialog(); } } I need to display the topmostForm in front of the default Windows Installer UI. The

Run batch file in Windows Installer Commit

隐身守侯 提交于 2019-11-26 23:11:40
问题 I am having no success in modifying a Windows Installer MSI to run a batch file after the primary output has been installed. I have searched for this and found many suggestions, but nothing that works. Add a Custom Action Custom actions can only be executable files. A batch file is not executable. Create a Windows Scripting Host executable that runs the batch file Many people have tried to do this, including on SO, and no one has been able to get this to work. Use WIX or InstallShield I do

Installer Custom Action problem - can't write to register key

爷,独闯天下 提交于 2019-11-26 15:57:00
问题 In the Custom Actions editor I've added the custom action to Install and Uninstall stages of the process. In the properties window I've marked the CustomActionData property as : /TARGETDIR = "[TARGETDIR]" I'm hoping that the above passes the installation directory info into the custom action. The custom action seems to be firing, but I'm getting the following error message : "Error 1001. Can't write to register's key" (or something like that, I'm translating it from my local language). What

How to install feature based on the property set in custom action?

笑着哭i 提交于 2019-11-26 14:55:25
问题 I am trying to install one from two features based on the value that should be set inside of the custom action. Firstly, I set the value of a property: UINT __stdcall ConfigurationCheckAction(MSIHANDLE hInstall) { HRESULT hr = S_OK; UINT er = ERROR_INSTALL_FAILURE; hr = WcaInitialize(hInstall, "ConfigurationCheckAction"); if (condition) { MsiSetProperty( hInstall, TEXT("STREAM"), TEXT("RED") ); } else { MsiSetProperty( hInstall, TEXT("STREAM"), TEXT("BLUE") ); } return WcaFinalize(er); }

WiX silent install unable to launch built in .EXE: WiX v3

只谈情不闲聊 提交于 2019-11-26 12:33:53
问题 I know this might seem like a duplicate, but I have tried almost anything online including the following links below: When using double click, the installation completes successfully and it launches my EXE which is a WPF UI. The problem is that if run in the command line, the WiX installer installs but my WPF doesn\'t launch. There is no driver update. Note that I have custom switches such as /? /q /forerestart /noreboot in my WPF. Launch after install, with no UI? http://wixtoolset.org

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

折月煮酒 提交于 2019-11-26 12:22:49
问题 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<Person>(); criteria.Add(\"stuff\"); // Now I need to access \'criteria\' from the Action..... } is there any way I can access the object from the Action that is currently executing. 回答1: I would recommend putting it in the Route data. protected override void OnActionExecuting(ActionExecutingContext

How to pass CustomActionData to a CustomAction using WiX?

社会主义新天地 提交于 2019-11-26 07:50:38
How are properties set on CustomActionData to be retrieved by a deferred custom action? Ayo I 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 set-property custom action — to pass that information along and you'll consume the data from the CustomAction's C# code through