custom-action

Close a systemtray app before uninstalling using wix

非 Y 不嫁゛ 提交于 2019-12-11 18:07:37
问题 I know similar questions have been asked in the past but I still haven't managed to find a solution to my problem as of yet. I've got a system tray app that's running and I want to close it before uninstall begins and displays the "FileInUse" dialog but whatever I'm doing doesn't appear to work. In order to close my system tray app, I need to create a file in the folder where it is installed. The app then deletes the file and closes itself. I'm getting the following issues depending on what I

Getting CustomActionData in deferred custom action

眉间皱痕 提交于 2019-12-11 18:01:49
问题 I try to get data from the CustomActionData property in a c++ dll, but it's always empty during the deferred sequence. If I use the exact same code in a CA executed during the UI sequence it all works great. UINT iCASize = 0; UINT uiStat = MsiGetProperty(hInstall, TEXT("CustomActionData"), TEXT(""), &iCASize); if (uiStat == ERROR_MORE_DATA) { // this means there are data to read. Allocate array for all data and read it (+1 for null termination) pCustData = new WCHAR[iCASize + 1]; uiStat =

WIX Installer. Rollback custom action for a custom action sequenced after installFinalize

无人久伴 提交于 2019-12-11 13:56:43
问题 I have some custom actions in my installer. These are sequenced after InstallFinalize action. I need to implement rollback for these custom actions. As Far as i read, I can only implement rollback for custom actions sequenced between InstallInitialize and InstallFinalize. Any way i can do it? 回答1: As you say, rollback applies only to the transaction part of the installation, which is between InstallInitialize and InstallFinalize. That is the install transaction and there is no rollback

Create file in installation folder using WiX custom action

亡梦爱人 提交于 2019-12-11 12:34:20
问题 I try to create a wix installer that has the need to create a file in the programme folder after Installation. For doing so, I have created a custom action, but I now have the following problem: In order to write the file, I need to know the installation directory from session["INSTALLDIR"] , which is only available if the action is executed "immediate" . However, if i run "immediate" after "install files", the target directory does not yet exist. If I run "deferred", it exists, but i cannot

Can only read/write 21 chars to InstallShield property from VB.NET

我只是一个虾纸丫 提交于 2019-12-11 11:40:48
问题 I'm using VB.NET and a custom action from within InstallShield to update some properties during an install. Everything works as long as I don't try to read or write more than 21 characters into the property, in which case it crashes. Just to be clear, if I enter this string "123456789112345678921" into the property via IS, then try to read it from VB.NET, everything works. If I add another char and read that, it crashes. Writing is similar - if I write (from VB.NET) the first string above it

Accessing InstallShield “Support Files” from DTF (Managed Custom Action)

佐手、 提交于 2019-12-11 11:11:32
问题 I have a bunch of .SQL scripts placed in the "Support Files" view of InstallShield. I want to access those SQL scripts in my custom action (via DTF). How can I do that? 回答1: InstallShield has a custom action to extract support files, called ISSetupFilesExtract. I guess when you add a support file, this action is automatically scheduled by the InstallShield engine. Hence, you can schedule your DTF custom action after ISSetupFilesExtract and address the support files extracted to the temp

WiX Custom Action - MSI copy itself

我与影子孤独终老i 提交于 2019-12-11 10:01:44
问题 Can someone help me to build a custom action in MSI which will copy itself after successful installation to some X location. I have already seen it can be done using .exe but I want to do it only with CA.DLL (C#) as this exe will be an overhead. 回答1: Here's an example VB script that will find an installed product by name and copy the cached copy of the MSI. This will work on Windows 7 and later, as the full MSI is cached and any embedded cab files remain in the MSI. You just get the MSI

Set edit control text value from custom action with WIX

吃可爱长大的小学妹 提交于 2019-12-11 08:23:02
问题 How can I change text value of an "edit" <Control /> from a C# custom action? I can populate a "combobox" control but I can't find a way to change an "edit" control value. 回答1: If you are dealing with a file browser dialog or folder browser dialog (Will work for your case as well), publish the changed property after executing the custom action. Best if you reset before calling the custom action. See following example <Control Id="editLocation" Type="Edit" X="45" Y="174" Height="18" Width="220

Can't get Wix custom action to work in Votive/VS2010

怎甘沉沦 提交于 2019-12-11 07:28:11
问题 Help! I need to execute a managed custom action in my Wix 3.5 setup project and no matter what I've tried I can't get it to work. I'm using the Votive integration in Visual Studio 2010. My Wix Product.wxs file is basically unchanged from the visual studio template except a few text changes: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="666ffc07-90b2-4608-a9f0-a0cc879f2ad0" Name="Product Name" Language="1033" Version="5.5.0002"

DTF and MsiGetProperty

南楼画角 提交于 2019-12-11 06:46:19
问题 Related to: Accessing InstallShield "Support Files" from DTF (Managed Custom Action) I need to read the property SUPPORTDIR . According to this forum (http://community.flexerasoftware.com/showthread.php?t=180742&page=3), I need to use MsiGetProperty. How can I call MsiGetProperty from DTF? 回答1: DTF's Session class has the method: public string this[string property] get: set: This gets remoted over to the unmanaged C++ side where they invoke MsiGetProperty and MsiSetProperty. It's kind of like