custom-action

Using cmd.exe in a VS Setup Custom Action

I set my Custom Action to cmd.exe and adding these arguments: /K XmlPreProcess.exe /x:"[SETTINGSFILE]" /i:"[TARGETDIR]web.config" [CUSTOMSETTINGS] /e:[ENVIRONMENTBUTTON] >log.txt I'm trying to either: a) stop the command screen so I can read it b) write the results to a file so I can read it. [ENVIRONMENTUTTON] should be equal...

Is it ok to schedule RemoveExistingProducts custom action before InstallValidate?

Problem I have an MSI that creates and starts a Windows service during installation and stops and removes the service during uninstallation. This works fine when installing and uninstalling by itself, but when upgrading, the Files in Use dialog is displayed (only on Vista and later due to the new Restart Manager), indicating that the se...

Custom Action in Deployment Project - prompt user for values, and then extract them from custom actions?

I am building a Windows Service which will be deployed on four servers. My user wants to have the service read a configuration file from a common location, and load it OnStart. I want the installation to prompt the user for the file path and file name to the configuration file when the service is installed, and then save that data in M...

Sequencing custom action in WIX before "LaunchConditions".

HI All, Is it possible to sequence a custom action before "LaunchConditions"? This is my custom Action: <CustomAction Id="CA_vcAppRunning" BinaryKey="vcShowMsg" DllEntry="IsAppRunning" Return="check" Execute="immediate"/> Sequenced in <InstallExecuteSequence/> <Custom Action="CA_vcAppRunning" Before="LaunchConditions" /> I tri...

WIX C++ Custom Action

Hi, I have a basic WIX custom action: UINT __stdcall MyCustomAction(MSIHANDLE hInstaller) { DWORD dwSize=0; MsiGetProperty(hInstaller, TEXT("MyProperty"), TEXT(""), &dwSize); return ERROR_SUCCESS; } Added to the installer: <CustomAction Id="CustomActionId" FileKey="Cu...

Access the AllUsers selection with an MSI CustomAction

I'm having a heck of time figuring out how to access the AllUsers selection from within a custom action. Thanks! ...

How do you execute a custom action in WiX only if an installed feature is being uninstalled?

I have a WiX installer that has per-feature custom actions that need to be executed on uninstall. Right now I'm running into a problem where the actions execute whether or not the feature was actually installed by the user. The custom actions fail because they expect certain resources to exist and then the entire install is stuck in a ...

Exception in Custom Action during RollBack

In custom action I override following function and got exception in rollback case... "savedState dictionary does not contain the expected values and might have been corrupted ". Is there any other way to rollback ? protected override void OnBeforeInstall(System.Collections.IDictionary savedState) { try ...

Wix: can't handle "Launch an application after install" checkbox = 0

Hello, I'm making an installation with WiX that have "Launch an application after install" checkbox. The goal is to have reaction on set checkbox as well as on unset checkbox. I case checkbox is set I need to run an application. In case checkbox is not set I need to run the same application but with command line argument. Here is a pa...

CAQuietExec fails in WiX installer while executing inetsrv\appcmd

I'm writing some CustomActions in WiX to migrate a web.config from IIS6 to IIS7 and am getting an error. However if I copy and paste the failing command from the install log file, it succeeds. Here's section of the log file that indicates the error. You'll see the first two appcmds succeed but the last migration command fails. Action 10...

Running an executable on network share with CustomAction with wix?

Hello, i have created a msi-package which compresses some xml-files to a zip-file during installation. I have created a CustomAction for this purposes: <CustomAction Id="CompressMy" BinaryKey="zipEXE" ExeCommand="a -tzip &quot;[TEMPLATE_DIR]my.zip&quot; &quot;[TempSourceFolder]data.xml&quot;" Return="check" HideTarget="no" Impersonate=...

Where is the file 'wixca.dll' if I have WiX 3 installed.

Following the recommendations here we created a custom action which references wixca.dll. Other places on the net they say this should just be installed with the WiX installer, but I can't find the file anywhere. I see another question where someone else experienced this in pursuit of logging, but eventually did not use the custom act...

Issue with Wix DTF while creating more than one action in a single DTF custom action assembly

DTF does not call the second action if the custom action assembly has more than one action. It always calls only the first action. As a workaround, I am using one action in one assembly. It works perfectly always. Do you have any idea on this issue? public class CustomActions { [CustomAction] public static ActionResult CustomA...

Run chm after msi installation?

I would like to launch a Windows Compiled HTML Help file with .chm extension after my MSI installation. There is a script at Run exe after msi installation that inserts a checkbox (had to use the two bugs fixes further down) into the last page of the installation. The script completes but I'm not sure if the LAUNCHAPP=1 can only launch...

WiX - CustomAction ExeCommand - Hide Console

We've gotten a custom action that runs command-line to work as such: <CustomAction Id="OurAction" FileKey="OurInstalledExe.exe" ExeCommand="our command line args" Execute="deferred" Return="check" /> The problem is, the user sees a console popup when the command runs. The command line requires UAC elevation, but should not require an...

Visual Studio Custom Actions - Commit

I added a second exe file in the Commit folder of a setup and deployment project, which has another exe in the Application Folder. I plan to run the first exe after the latter. First when I tried to run the main exe which is in the Application Folder, an error message came that it cannot run the second one since .msi file is missing. Aft...

Cancel installation from my custom action

Hi. I'm writing installer for my program using Windows Installer (not wix). In some cases i want cancel installation proccess from my custom action. Beside, i want show an error message with my text. How do this? C#, .net 3.5 ...

deleting registry key, using Visual Studio 2008 setup and deployment project in windows 7

I have created a setup and deployment project in Visual Studio 2008 Professional. I'm using Visual C++, and in it I have two exe files which run under custom actions. One is running in commit and other in uninstall. Purpose is to add a registry key at install time and remove it at uninstall. It works perfectly on Windows XP but when I ch...

Apply a transform to the binary table to alter a custom action

We recently had an MSI go out the door with a bad bug in a custom action. I was able to create a transform for the MSI binary table and this did work but I think I was lucky. I altered the custom action (Installscript), compiled the script and then exported the binary table. I imported the binary table into a copy of the base MSI and the...

DTF CustomAction to WiX

Hi All, I'm using a DTF immediate custom action. The Custom Action takes minimum of 5 minutes to perform its operation. Until that in the progress dialog, only the progress text is visible. The progress bar doesn't move at all. I set the ProgressText in the WiX file. How can i make the progress bar to move, so that it will be much user ...