custom-action

msi Installer to run twice

☆樱花仙子☆ 提交于 2019-12-07 18:16:53
问题 I have an program that gets installed via an msi. The msi was built using a VS2008 deployment project and has a custom action to run the program once the install is complete. Once the msi has been run, I can simply update the version number, generate a new product code and the msi can be run again on the same PC. However, what I want is to be able to run the msi a second time on that same PC (without using msi repair) and have it re-install the software again (even if nothing has changed). Is

Force Reboot from Custom Action in Msi in C#

人盡茶涼 提交于 2019-12-07 14:31:28
问题 How can we prompt for a computer restart after install from within a C# custom action? We are using VS 2005's setup project for our setup, and we need to programmatically decide to prompt for a restart (so it will not happen on every install, just on some). UPDATE: We're looking for something that is already built into the MSI custom action system first. If that doesn't exist, we can resort to restarting the PC ourselves somehow, but would like to avoid that. UPDATE: We see where you can set

Set environment variable before running a custom action in WiX

眉间皱痕 提交于 2019-12-07 11:58:36
问题 I have to build an MSI-based installer using WiX and I need to set environment MY_HOME before running a command action. I have a component: <Component Id="SEMYHOME" Guid="*my guid*"> <CreateFolder /> <Environment Id="MY_HOME" Action="set" Part="all" Name="MY_HOME" Permanent="no" System="yes" Value="[APPLICATIONPATH]myapp"/> </Component> Then I have a custom action: <CustomAction Id="InstallMyService" Directory="INSTALLDIR" ExeCommand='"[INSTALLDIR]myapp\install_service.bat" install' Execute=

How to execute multiple launch conditions on installer exit

孤者浪人 提交于 2019-12-07 07:30:53
问题 I've managed to get WIX to launch my application on exit, but not sure how to schedule two custom actions using the WixShellExecTarget property. One CA is to launch an app and the other is a web page based on a url from another CA. These are both launched if the appropriate checkboxes are checked. <!-- Custom action for executing app --> <Property Id="WixShellExecTarget" Value="[#Application.exe]" /> <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate=

WIX: Using a temporary file during install

我与影子孤独终老i 提交于 2019-12-07 00:13:33
问题 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 path to the file A. I don't want to include A as a file installed in the Program Files folder and removed during the uninstallation process. Instead, I would like to

WiX: How to execute a command line command after installation

◇◆丶佛笑我妖孽 提交于 2019-12-06 21:04:06
问题 I need to register an HTTP port after installation, but I guess this could be abstracted to generally executing any command line command. Here's what I've got so far: <CustomAction Id="ExecPortOpen" Directory="INSTALLFOLDER" Execute="immediate" ExeCommand="cmd.exe "netsh http add urlacl url=http://+:1234/ user=Everyone"" Return="ignore" /> <InstallExecuteSequence> <Custom Action="ExecPortOpen" After="InstallFinalize" /> </InstallExecuteSequence> This just opens a command prompt mid-install

How to find the setup location in an VBScript custom action for InstallShield?

耗尽温柔 提交于 2019-12-06 11:51:25
In an InstallShield project I have a VBScript custom action that conditionally needs to execute a certain file packaged with the install. Normally I get the current directory of a vbs using code such as sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".") Which, if it returned the location of the Setup.exe that initiated the install, should work. However when running the install, the current path (on XP) is C:\Windows\system32 instead of the location of the Setup.exe file I was expecting. Assuming the output of my InstallShield build looks like the following Disk1 -

WIX property from a Custom Action into a WIX variable

試著忘記壹切 提交于 2019-12-06 11:37:25
May seem like a trivial question but I cant get it to work. QUESTION: Can u set a WIX property from a Custom Action into a WIX variable? This is what I have tried: <?define VAR = "ProductName"?> <Product Id="*" Name="$(var.VAR)" Language="1033" Version="1.0.0.0" UpgradeCode="$(var.UpgradeCode)"> <Property Id="VAR">ProductName</Property> <CustomAction Id='GetProductName' BinaryKey='GetProductName' DllEntry='GetProductName' Execute='immediate' Return='check' /> <CustomAction Id="CustomAction1" Return="check" Execute="immediate" Property="VAR" Value="[PRODUCTNAME]" /> <InstallUISequence> <Custom

Windows Installer custom action BEFORE any validation

蓝咒 提交于 2019-12-06 11:23:31
问题 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 closed so that setup can continue. This works fine when the MSI passes through the UI sequence as the action is created in "InstallUISequence" table like in

WiX. Run a custom action when a checkbox is checked

扶醉桌前 提交于 2019-12-06 10:29:36
问题 I have two files Product.wxc there i wrote <Property Id="CheckBoxProp"> and Custom Action <InstallExecuteSequence> <Custom Action="MyCustomAction" After="InstallInitialize"> CheckBoxProp=1 </Custom> </InstallExecuteSequence> In another file MyCheckBoxDlg.wxc I wrote UI dialog there I described checkbox <Control Type="CheckBox" Id="MyCheckBoxID" Width="125" Height="26" X="26" Y="124" Text="My text" Property="CheckBoxProp" CheckBoxValue="1" /> All publishs I wrote in another file where I have a