custom-action

No Debug Info in WiX Managed Custom Action using Visual Studio integration

I have managed to create a custom action in C# using MakeSfxCA which is mostly working. However, there is some kinks which needs debugging to sort out. (The "printf-debugging" just is not enough.) However all debug info is lost. When MakeSfxCA is called from the Visual Studio project the .pdb-file is not passed as an argument, so no de...

How can a wix custom action dll call be made to use the debug runtime via a merge module?

I'm trying to create a debug build with a corresponding debug installer for our product. I'm new to Wix so please forgive any naivety contained herein. The debug Dlls in my project are dependent on both the VS2008 and the VS2008SP1 debug runtimes. I've created a merge module feature in wix to bundle those runtimes with my installer. ...

WIX: Using a temporary file during install

Hello! I am writing a WIX installer and I have a following requirement: During installation, I need to pass an absolute path to a file (lets call it A) included in my installer to a COM component, which already exists on the hard drive and is a part of another program. I have already written an appropriate Custom Action which expects a ...

FileNotFoundException when running WiX CustomAction with COMAdmin interop

I am trying to create a WiX custom action which will allow me to shutdown and clear down a COM+ package as part of an upgrade installation, or create and configure a new COM+ package as part of the initial installation. I previously had this running as a CustomAction within a standard Visual Studio MSI but this only allows the custom ac...

Can I generate a value in an installer and write it to the app.config ?

I'm working on an installer project, during the install process I'd like the user to create a "root" account. I'd like to have the root password become a part of the app.config's file, preferably the encrypted section. Is such a thing possible? Are there any known solutions to this problem? Best regards ...

Executing Custom Actions immediately in WIX

Is there any way to execute a custom action in WIX as soon as the first dialog (welcome) appears? The requirement is to check prerequisites, and some of those require a custom action. The custom action could be executed as we click to the next dialog, but then the standard WIX prereqs are determined apart from our custom prereq. (The ...

WIX - Run custom action on installation cancellation

I'm wirintg an installer using WIX and I need to execute a custom action when a user press the "cancel" button. I've created a custom action but I don't seem to find where to use that action. Any ideas how can I do that? ...

Wix - How do I specify a directory to run a batch file in?

I want to run a batch file, which I do via the following: <CustomAction Id='InstallFilter' FileKey='install' ExeCommand='' Execute='deferred' /> <InstallExecuteSequence> <Custom Action='InstallFilter' Before='InstallFinalize' /> </InstallExecuteSequence> This will execute the batch file, but it runs in C:\Windows\System32 (or so...

.NET 4.0 Custom Action fails

We have a custom action in our installer. We upgraded our projects to the .NET 4.0 framework, and when it applies the custom action, the installer throws a 1001 error that says the version of the framework is invalid. The custom action uses the value from a radio-button window earlier in the installer (i.e. takes CustomActionData). In...

Windows Installer custom action BEFORE any validation

I wrote a Windows Installer custom action based on the tutorial found here: http://www.codeproject.com/kb/install/msicustomaction.aspx My custom action is killing a background process of a given name which could still be opened by the user. The reason is that I don't want users to see the warning that a given EXE is running and must be ...

WiX: Extracting Binary-string in Custom Action yields string like "???good data"

I just found a weird behaviour when attempting to extract a string from the Binary-table in the MSI. I have a file containing "Hello world", the data I get is "???Hello world". (Literary question mark.) Is this as intended? Will it always be exactly 3 characters in the beginning? Regards Leif Sample code: [CustomAction] public stat...

32 and 64 bit assemblies in one windows installer

Hello, I have an application written in C# which depends on sqlite managed provider. The sqlite provider is platform dependent (there are two dlls for 32 and 64 bit applications with the same name). The application loads the desired one at runtime based on OS. The problem is that while creating an installer I cannot add 64 bit mode dll...

How to conditionally exclude features from "FeaturesDlg" in WiX 3.0 from a managed Custom Action (DTF)

I am trying to put together an installer using WiX 3.0 and I'm unsure about one thing. I would like to use the FeaturesDlg dialog to allow the users to select features to install, but I need to be able to conditionally exclude some features from the list based on some input previously received, preferably from a managed Custom Action. I...

Using a WinForm as a Windows Installer Custom Action

Hello - I am working on in installer project that needs to gather some info and act on it during the install (mainly online key retreival and registration). The Setup Project UserInterface templates seem inflexible and poorly documented so I am looking at opening a WinForm as a Custom Action. I know this is possible because I see refere...

How to run a custom action after install which can run in quiet or a UI after Install (WIX)

Hi, I basically want to able to run an command line tool that already exists on the desired machine against the directory the files were run to. I.e The Installer does the following: Specify a location for the files to go into (INSTALLOCATION variable) Then after copying has finished run a tool which will zip the files and attach them...

How to check for cancel button in custom action without doing anything else.

I know when I put something in the log using ::MsiProcessMessage(hModule, INSTALLMESSAGE(INSTALLMESSAGE_INFO), ...); that I can check if the return value is IDCANCEL and return ERROR_INSTALL_USEREXIT to Windows installer. How do I check for that return value without having to put something in the log or alter the progress bar? ...

How can I remove .NET isolated storage setting folders during WiX uninstallation?

I would like to remove the isolated storage folders that are created by a .NET application when using My.Settings etc. The setting files are stored in a location like C:\Users\%Username%\AppData\Roaming\App\App.exe_Url_r0q1rvlnrqsgjkcosowa0vckbjarici4 As per this question StackOverflow: Removing files when uninstalling Wix I can unin...

Create Folders from text file and place dummy file in them using a CustomAction

I want my msi installer to generate a set of folders in a particular location and put a dummy file in each directory. Currently I have the following CustomActions: <CustomAction Id="SMC_SetPathToCmd" Property="Cmd" Value="[SystemFolder]cmd.exe"/> <CustomAction Id="SMC_GenerateMovieFolders" Property="Cmd" ExeCommand="for /f &quot;tokens...

DTF Custom Action reference in WiX not a valid WiX reference

I can build a managed custom action just fine using the DTF tools (I.E MakeSfxCA.exe) My post build event command line looks like this: "%WIX%SDK\MakeSfxCA.exe" "$(TargetDir)$(TargetName).CA.dll" "%WIX%SDK\x86\SfxCA.dll" "$(TargetDir)$(TargetName).dll" "$(TargetDir)Microsoft.Deployment.WindowsInstaller.dll" But wheneve...

WiX custom action with DTF... quite confused...

Okay, I have decided the only way I can do what I want to do with WiX (thanks to an old installer I didn't write that I now have to upgrade) is with some CUSTOM ACTIONS. Basically, I need to back up a file before the RemoveExistingProducts and restore that file again after RemoveExistingProducts. I think this is what's called a "type 2...