custom-action

How to run a “.bat” file during installation?

China☆狼群 提交于 2019-12-17 06:34:19
问题 In a Setup project the executable files such as ".exe , .dll , .js , .vbs" are acceptable but there is no way to run a .bat file in a Custom Action. The question is how to run the *.bat files during installation? 回答1: Well, after much searching and trial and error I have solved this. I'm not sure if this is the best way, but it works. Here's the scenario: I have an application I would like to deploy via a Visual Studio Setup project. In addition to my application files, I would like to create

Be able to pass the installation directory with a custom installshield setup

非 Y 不嫁゛ 提交于 2019-12-13 05:58:18
问题 @all, I am trying to create an InstallShield installation (the one that can be integrated in visual studio 2013) In the tab custom actions I'd like to start a program that is placed in the [commonfolder]. As a commandline parameter I want to pass the installation path the user give to install the application. See the attached illustration. Now as you can see the command line already has a some info I want to pass the install dir. as a parameter. Thanks in advance 来源: https://stackoverflow.com

wix SetProperty Before='AppSearch'

喜欢而已 提交于 2019-12-13 04:40:41
问题 How i can change date and time format? I need replace ":" to "_" in time. Below my code: <SetProperty Before='AppSearch' Sequence='both' Id='HOSTNAME' Value="[ComputerName]_[Time]_[Date]">NOT HOSTNAME</SetProperty> 回答1: The MSI SDK documents this pretty well: Time Property: The format of the value depends upon the user's locale, and is the format obtained using GetTimeFormat function with the TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER option. So the user's locale will affect the format, and

installer registry access in windows server 2012

陌路散爱 提交于 2019-12-13 03:24:46
问题 I have a custom action in an Installshield Basic MSI project to find out the version of SQL Server from registry. RegKey2012 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\" & _ "Microsoft SQL Server\MSSQL11.MSSQLSERVER\" If RegKeyExists(RegKey2012) Then WScript.StdOut.Write("2012") Else WScript.StdOut.Write("2008R2") End If Function RegKeyExists(Key) Dim oShell, entry On Error Resume Next Set oShell = CreateObject("WScript.Shell") entry = oShell.RegRead(Key) If Err.Number <> 0 Then Err.Clear

Simple WiX Custom Action in Custom UI Ends Prematurely with Windows 7

一个人想着一个人 提交于 2019-12-13 00:19:59
问题 My WiX installer UI is getting error while using the Custom Action. Interesting part is, the installer is working fine in Windows 10 but while launching it on Windows 7, installer is getting interrupted. From the installer logs, the error code is displayed 2896 . Googling further the error code, pointed me that it could be the mismatch of .net framework version. So I modified my CustomAction.config as follows : <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4

wix - remove old program folder before install

随声附和 提交于 2019-12-12 18:29:04
问题 I need installer to remove old install dir (if exists), just before installer starts copy new files. This folder contains some files and subfolders generated during program usage and they are not included in installer. Because of this, I've created custom action to do this. So, some code. First, custom action code (nothing special there): [CustomAction] public static ActionResult RemoveOldDatabase(Session session) { bool removeDatabase = session.CustomActionData["RemoveDatabase"] == "true";

WiX custom action with DTF… quite confused

牧云@^-^@ 提交于 2019-12-12 10:25:00
问题 Okay, I have decided the only way I can do what I want to do with WiX (thanks to an old installer I didn't write that I now have to upgrade) is with some CUSTOM ACTIONS. Basically, I need to back up a file before the RemoveExistingProducts and restore that file again after RemoveExistingProducts. I think this is what's called a "type 2 custom action." The sequencing I think I understand, however, what I don't understand is first of all how I pass data to my C# action (the directory the file

Uninstall multiple products using Custom Action

我的未来我决定 提交于 2019-12-12 08:13:42
问题 I am developing WIX based instller for our product which is having a base product and many plug-ins. Base and plug-in will be shipped as separate MSIs. Plug-ins can be installed only when base is available. Base and plug-ins are sharing common folder tree under a ROOT folder like "C:\Program files\MyProduct". I am using custom actions to uninstall all dependant plug-ins. But the plug-ins are not uninstalling properly. It is very random. Some times three plug-ins got uninstalled and some times

How to install flash player from adobe site while installing my C# application?

那年仲夏 提交于 2019-12-12 05:38:30
问题 I have created a setup project for my C# application. I want to install flash player before my C# application installs. The flash player installation should happen from the online location http://download.macromedia.com/pub/labs/flashplayer10/flashplayer_square_p2_64bit_activex_092710.exe How to prompt the client for installing flash player from the above location, before installing my C# application. I thought of adding a project to my solution, which will install the flash player from the

Using cmd.exe in a VS Setup Custom Action

坚强是说给别人听的谎言 提交于 2019-12-12 05:25:49
问题 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 to QA - which I selected from a dialog form showing 4 radio buttons. [SETTINGSFILE] is a user-entered field also a a dialog form. The command window flashes by, I don't