custom-action

Failed to get MSI property in UPGRADINGPRODUCTCODE, WIX_UPGRADE_DETECTED

纵然是瞬间 提交于 2020-01-03 03:40:10
问题 I wanted to skip some of my custom actions during upgrade, uninstallDriver , to achieve this I have tried to retrieve property WIX_UPGRADE_DETECTED and UPGRADINGPRODUCTCODE , but both of them are not set. Sample code: UninstallDriver(MSIHANDLE hInstall) { char szBuff[1024]; DWORD dwValue = 0; OutputDebugStringA("UninstallDriver"); MsiGetPropertyA(hInstall, "UPGRADINGPRODUCTCODE", szBuff, &dwValue); OutputDebugStringA("UPGRADINGPRODUCTCODE");OutputDebugStringA(szBuff); MsiGetPropertyA(hInstall

Wix: Write File in Custom Action

坚强是说给别人听的谎言 提交于 2019-12-31 00:50:27
问题 i got a problem with wix and managed custom actions: in my custom action i create a file and save it in the INSTALLLOCATION path. It seems like it works, no exception is thrown. But after the installation, the just created File not exists in the INSTALLLOCATION . WiX-File: <CustomAction Id="SetInstallPath" Property="CreateTimeStamp" Value="[INSTALLLOCATION]" Execute="immediate"/> <CustomAction Id="CreateTimeStamp" BinaryKey="SetupActions.dll" DllEntry="CreateTimeStampFile" Execute="deferred"

WiX - CustomAction ExeCommand - Hide Console

社会主义新天地 提交于 2019-12-29 04:30:11
问题 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 any user interaction. We also install the file with the setup, the custom action runs After="InstallFiles". How do we prevent the user from seeing the console? 回答1:

How to execute conditional custom action on install and modify only?

馋奶兔 提交于 2019-12-28 02:18:34
问题 I have a installer which is working fine. I want to run custom action only in install and modify only. Here is my custom action: <Custom Action="UpdateAPMDBAPasswordAndStoreInRegistry" After="InstallFinalize"><![CDATA[&BaseModel = 3 OR &FeaturePostMaster = 3]]></Custom> The above custom action is not running when modify the the installer. It runs only when install the installer. After googled, i did this but it is also not working: <Custom Action="UpdateAPMDBAPasswordAndStoreInRegistry" After

How to pass parameters to the custom action?

心不动则不痛 提交于 2019-12-27 15:47:13
问题 I'm trying to create a custom action with "Value" attribute, I want to pass parameters to the C# code (the TARGETDIR and the version). However, I get an error stating that DLLENtry and Value cannot coexist. But the custom action without dllentry is invalid. This is the code: <CustomAction Id="SetMAWPrefferences" Value="InstallDir=[TARGETDIR];Version=2.0.0.1" Return="check" Execute="commit" BinaryKey="ImportExportBinary" /> And for it I get this error: Error 9 ICE68: Invalid custom action type

How to pass parameters to the custom action?

陌路散爱 提交于 2019-12-27 15:43:09
问题 I'm trying to create a custom action with "Value" attribute, I want to pass parameters to the C# code (the TARGETDIR and the version). However, I get an error stating that DLLENtry and Value cannot coexist. But the custom action without dllentry is invalid. This is the code: <CustomAction Id="SetMAWPrefferences" Value="InstallDir=[TARGETDIR];Version=2.0.0.1" Return="check" Execute="commit" BinaryKey="ImportExportBinary" /> And for it I get this error: Error 9 ICE68: Invalid custom action type

Use DLL that is not installed on the system

不羁岁月 提交于 2019-12-25 18:45:18
问题 I am creating a C# CustomAction DLL from which I have to use another DLL that is not (yet) installed on the target system, but included in my installer. How will I be able to use this DLL in my C# CustomAction? The reason is that I have to check whether the provided credentials are accepted by the Web service this DLL hooks into before I write the credentials into web.config and encrypt web.config. 回答1: You could always try this - seems to be what you're looking for, a way to get the Dll and

How to prevent to log execution steps of Custom Action in InstallShield?

孤街浪徒 提交于 2019-12-25 15:41:06
问题 I have made one installer using InstallShield. I have written some Custom Actions in that. While installing this installer, the logs (execution steps) of those CustomActions gets printed in log file. But I want to prevent to log some CustomActions's data (execution steps) into log file. I don't want to let user know what exactly the Custom Action is doing for security purpose. So how I can prevent some CustmAction to log their execution steps into log files ? I want to prevent whole

Why I am getting blank value for SourceDir in a managed Custom Action in WIX?

自闭症网瘾萝莉.ら 提交于 2019-12-25 10:49:32
问题 Here is the code for the Product.wxs I am using: <Product Id="*" Name="abc" Language="1033" Version="1.0.0.0" Manufacturer="def" UpgradeCode="2b75c560-783e-4688-9a02-da09bf986597"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MediaTemplate /> <Binary Id="myCustomActionsDLL" SourceFile="..\SetupConfiguration\bin\debug\SetupConfiguration.CA.dll" /> <CustomAction Id=

How to update xml with properties added by the custom action

ε祈祈猫儿з 提交于 2019-12-25 08:01:08
问题 I am building a MSI which in-turn creates a windows service. I have a custom action which uses the archives embedded in the MSI, explodes it. After which it creates a couple of properties, which needs to be updated in the app.config of the msi. I am using <util:xmlFile> element of wix to update the config file. But then it doesnt contain the values updated in the properties. Custom action details : After : InstallFiles Execute : " SecondSequence " // Execute Immediate throws file not found