custom-action

WiX Executing an Application Unconditionally

alo Everyone. My problem is twofold. I have a WiX Project that I have been working on, and have been tasked to make it perform a program execution regardless of the user pressing cancel, the installation being aborted (via an already existing version) or the user successfully finishing the installation. I currently use the built-in di...

Problem invoking PowerShell commands from C# custom action in WiX installation

Background: I'm writing an installation for a SharePoint component. In addition to getting the software onto the target machine, I want to properly configure it. SharePoint (esp. 2010) exposes its management functionality via PowerShell. So I wrote a C# custom action to invoke a series of commands, like this: Runspace runSpace = Runs...

WIX Custom Action - run at different times for install, upgrade and uninstall

Hi all, I have a custom action that removes various directories as part of the uninstall process. I want to call this action at different points in the install sequence depending on what's being done: During an install, don't run the custom action During an upgrade, run the custom action after RemoveExistingProducts During an uninstall...

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 buildable C# CA with working references.) I have two custom action assemblies written in ...

Wix: Passing an object from one CustomAction method to another - Best Practice?

I am interested in the best practice of the following scenario. I have a CustomAction method that hits a web service and returns some information that I use to populate a combo box. Later in the install process in another CustomAction method, I need to access some of the meta data returned from that first web service call. In the first...

WiX: make symbolic link with UAC enabled

Hello. I want to execute a custom action in a Windows Installer (with WiX script) that makes symbolic links at the end of installation. mklink requires administrator privilege, as the installer restricts. This is what I wrote: <CustomAction Id="mklink_cmdline" Property="QtExecCmdLine" Value='"[SystemFolder]cmd.exe" /c mklink "[SystemFol...

How do I do a search and replace on a configuration file using Wix?

Some code I inherited has its "configuration" (if you can call it that) embedded into its PHP and ASP (don't ask) code. Because its not an XML or INI file, I'm having the darnedest time figuring out how to modify these files at install time. If I could, I'd like to do a simple search and replace. I've read elsewhere (http://stackoverf...

How do I set the selected item in an MSI combo box that has been filled from a custom action?

I'm creating an web site MSI using WiX. I have a custom action (written in C#) that fills a combo box with the descriptions of the web sites in IIS so the user can select an existing web site to install to. Works fine - apart from the fact that there's no item selected when the dialog page is first shown. I'd like the first site in the ...

Call custom action from vs2005 installer before installation end

I've created an installer in VS2005. I've added a custom class, and I've also added some additional UI dialogs to the installer. I would like the textboxes in my added dialogs to be required fields. How can I implement that? In my searches, I've only seen actions added to the custom class that can be carried out at the end of installatio...

How do I get the user's temp folder path in an installer custom action?

In our installer, the bootstrap app sometimes needs to do stuff that involves leaving files in the temp folder for custom actions in the MSI to pick up. The problem is, when a person remote logs into the OS using Remote Desktop Connection, the bootstrap app and the MSI see the temp folder in different locations. For instance, on Windows ...

Resharper scripting (with custom actions)

I have a large number of auto-generated (from XML) classes that also can contain some manually added members. When doing it's work, the generator would only add new members to the file, and leave the rest alone. Now I've decided to split the class to two files. One containing auto-generated content, and other containing manual members an...

Renaming config files with Visual Studio setup project

My applications have a handful of config files, each one particular to the machine it's being deployed to (dev, production, etc.) I'm wanting to add them to the setup project, use radio buttons to select one and then have a script (or maybe custom action?) rename the selected files to connectionStrings.config, settings.config, etc. Is t...

Rails custom actions

I am not sure if I am going about this the right way or not. I have a model Neighborhood. I have a two ways you can add a neighborhood, one as a logged in user and the other as a public person. The forms vary a bit. So I made another view with a custom action. The problem is this action is adding a new record and therefore calls on "cr...

How to run a CA as another user?

My installation is always executed in a Computer where I know the user/password of a user with administrator privileges. The installation needs Administrative privileges to execute so I created an EXE that executes the installation using this known user. My problem know is that the installation launches an EXE from a Custom Action once...