custom-action

Unable to delete deployed file during installation with WIX installer

廉价感情. 提交于 2019-12-25 05:18:38
问题 In our WIX installer project, we need to generate a new file, let's call it FileB, based on a deployed file, called FileA in a managed custom action function. In another word, in the component declaration, I declare the FileA. While in a custom action (which happens at commit phase), I need to generate FileB based on FileA. After that, since FileA is no use anymore, I want to delete it in the same custom action. And here comes the problem: with the default installation folder, which is

Wix custom action execute cmd not working

余生颓废 提交于 2019-12-24 07:53:48
问题 I'm trying to execute a custom action during a wix installation and getting an error when the custom action gets called. I want to add the permission group "Everyone" with full control to a folder using cacls. When I run it from cmd it works fine but from the installer it doesnt work. Below is the error message from the wix installation log. Info 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support

How can I terminate a process before installing a program?

心已入冬 提交于 2019-12-23 23:03:15
问题 I'm working on a system tray application that will likely see frequent future updates. To that end, it would be desirable for our users to have the installer find and kill the application process before trying to install it. This is the class that I have found for the custom actions of both starting the process after the install, and terminating it prior install. public InstallerActions( ) : base( ) { System.Diagnostics.Debugger.Launch( ); this.BeforeInstall += ( S, E ) => { System

Wix: Set permission of a folder within the installfolder using permissionEx

邮差的信 提交于 2019-12-23 20:34:02
问题 I'm creating an installer for an ASP.NET MVC web app using Wix, and I need to set a write permissions for the IIS_WPG on a particular folder in the site. I found an example (I think, still haven't got it working) of how to do this with cacls.exe: <CustomAction Id="PermissionAppData" Directory="TARGETDIR" ExeCommand=""[SystemFolder]cacls.exe" "[INSTALLDIR]\Content\uploads" /T /E /G IIS_WPG:M" Return="check" /> However, I've heard that PermissionEx is better as it modifies ACLs instead of

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

独自空忆成欢 提交于 2019-12-23 17:36:31
问题 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 debug-info is included in the created CA-dll. If I manually run MakeSfxCA MakeSfxCA MyDLL.CA.dll SfxCa.dll MyDLL.dll MyDLL.pdb CustomAction.config then the debug

Wix installer - how to run change with administrative privileges when run from Uninstall or change program in Control Panel

柔情痞子 提交于 2019-12-23 17:13:48
问题 My installer has a custom action which contacts a windows service and set some parameters. In order to successfully use the service, it must be run with the elevated privileges. In the first time install when a user clicks on the Install button, it is presented with the UAC prompt and install completes successfully. However, when a user decides to change the product(add new feature), call to the service will fail! This happens because installer is not run in the privileged mode. When I start

How to protect MSI against modification

冷暖自知 提交于 2019-12-23 03:19:04
问题 I would like to protect the MSI file against modification. It could be easily done with ORCA or with MSI API. It is sad because anyone can modify/add/remove windows installer custom actions or properties who have admin rights. Is there any way to set an MSI file to some read-only mode or somehow protect its content? 回答1: The short answer is no, you cannot prevent someone from editing a .msi file. There are various approaches you can take to minimize the likelihood of someone doing so, or

Best way of displaying a Message box or Confirmation box in ASP.NET

这一生的挚爱 提交于 2019-12-23 02:32:10
问题 I came across requirement for message box like everyday since around a year now, I tried jQuery plugins, JavaScripts alert but am still not sure which way would be the best way of doing it. I want to display a message box within ASP.NET Page (well its actually sharepoint application page). <%@ Page Language="C#" MasterPageFile="~/_layouts/abc/simple.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %> <%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0

Wix: Dynamically Add Features

僤鯓⒐⒋嵵緔 提交于 2019-12-22 12:30:52
问题 We are using Wix to build msi for our software. We have some components (plugins) to be implemented to the target machine. The plugins are different from one client to another. What we want to be able to do is to create a standard build and modify the feature list in the msi package. Is there a way to change the feature list dynamically from a custom action? (e.g. read the available plugins from a custom action and add some entries into the msi feature list accordingly)? Any comments, advice,

Executing Custom Actions immediately in WIX

*爱你&永不变心* 提交于 2019-12-22 09:56:58
问题 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 custom action we need is to check that IIS 6 Metabase Compatibility is turned on and a registry search does not work on x64 machines with a 32-bit installer) 回答1