custom-action

How to read certain registry key from Wix managed bootstrapper or custom action?

我怕爱的太早我们不能终老 提交于 2019-12-04 05:00:08
问题 I am having trouble reading this key from my managed bootstrapper (.NET 4.5.2), and my custom action (tried .NET 2.0 and 4.0). HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages I tried running the bootstrapper and msi using cmd as Administrator. My test environment is Windows 7 64-bit. I am using Wix 3.11 I made a test command line app and it was able to access this key. The testing code I used in the bootstrapper and custom action: static

change installer properties in C# custom action

白昼怎懂夜的黑 提交于 2019-12-04 04:00:36
How to change installer properties in my C# custom action? To access a WiX property, such as those set with the Property element, use the Session object's indexer. Here is an example: [CustomAction] public static ActionResult CustomAction1(Session session) { string myProperty = session["MY_PROPERTY"]; return ActionResult.Success; } Setting properties is just as easy. You'll set the value by referencing the key with the name of your property. Here's an example: [CustomAction] public static ActionResult CustomAction1(Session session) { session["MY_PROPERTY"] = "abc"; return ActionResult.Success;

WiX CustomActionData is empty in called CustomAction

浪尽此生 提交于 2019-12-04 00:32:07
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 the configuration file, I need to know the (install-)location of it within my CustomAction . Therefore I try passing the INSTALLLOCATION and Filename to my CustomAction . Here lies the problem: The CustomActionData -Attribute is always empty and the setup throws an exception. My CustomAction is a C# DLL file: DemoDatumErzeugen.CA.dll . It contains

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

て烟熏妆下的殇ゞ 提交于 2019-12-03 23:40:37
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 and uninstall. I've tried adding the "NOT INSTALLED AND NOT UPGRADINGPRODUCTCODE" condition, but that gave me an error: Error 2762. Cannot write script record. Transaction not started. I've also tried attaching to other actions (for example, UnpublishComponents), but I can't find any that are unique to install or uninstall. How can I fix this problem?

Wix CustomAction update UI?

百般思念 提交于 2019-12-03 22:38:29
问题 If I have a managed Wix Custom Action, is there anyway I can update a Control with the type of Text? I see that a progress bar can be updated by using the session.Message with InstallMessage.Progress , but I do not see a way for updating other UI. 回答1: For a text control you can use a property wrapped in brackets: [SOMEPROP] Then in your CA you can say session["SOMEPROP"] = "somevalue". Note MSI is wonky about refreshing the UI so you'll pretty much have to transition from one dialog to

wix SetProperty After attribute won't take custom action Id

邮差的信 提交于 2019-12-03 11:15:01
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 and straight forward on the subject (hah!), but I'm getting "Found an ActionRow with a non-existent After action: MyWonderfulCA" instead of happiness (which really is what I'm after : ) Here's a representation of what my code looks like: <CustomAction Id="MyWonderfulCA" BinaryKey="MyWonderful.dll" DllEntry="MyWonderfulCA" Execute="immediate" />

Create Custom Action to Start Application and Exit Installer

╄→гoц情女王★ 提交于 2019-12-03 08:41:52
Thanks to StackOverflow I found out yesterday how to add a custom action to the Visual Studio Installer to start my program after an update. The problem I now face is that at the end of the installer the program does open but the installer never finishes until I exit my app. Is there a way to ensure the app starts only after the user clicks finish on the MSI package? Or the program starts at finish of installer but installer completes and exits? I am running Visual Studio 2010 in case it matters. After some Googling, I found out that the custom action for the Visual Studio Installer might need

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

痴心易碎 提交于 2019-12-03 06:23:11
问题 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 path of our installation (e.g. TARGETDIR) //string configPath = System.IO.Path.GetDirectoryName(Context.Parameters["AssemblyPath"]) + @"\config.xml"; string configPath = @"C:\Program Files\Blueberry\Serial Number Reservation\config.xml"; // Get a

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

帅比萌擦擦* 提交于 2019-12-03 01:19:11
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 update the app.config with the user's desired settings. I added a Textboxes (A) dialog to retrieve the values. I set the Edit1Property property to "TIMETORUN", and in my Primary Output action's CustomActionData property I put in the following: /TimeToRun="[TIMETORUN]\" . So far so good. Running the setup I can retrieve the TimeToRun value from the

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

岁酱吖の 提交于 2019-12-02 18:52:42
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 path of our installation (e.g. TARGETDIR) //string configPath = System.IO.Path.GetDirectoryName(Context.Parameters["AssemblyPath"]) + @"\config.xml"; string configPath = @"C:\Program Files\Blueberry\Serial Number Reservation\config.xml"; // Get a FileSecurity object that represents the current security settings. FileSecurity fSecurity = File.GetAccessControl