custom-action

Session.Message not showing pop up message on product installation screen

本小妞迷上赌 提交于 2020-12-13 03:31:06
问题 I have a customActions class: public static ActionResult Register(Session session) { try { Do SOmething } catch (Exception ex) when (ExceptionManager.catchGenericExcetion(ex)) { var responseMessage =ex.ResponseMessage; if (responseMessage.Contains("Maximum apps created")) { session.Log("maximum limit reached"); using Record record = new Record(0); record[0] = "This is an error!Max apps reached"; session.Message(InstallMessage.Error, record); } return ActionResult.Failure; } return

Session.Message not showing pop up message on product installation screen

人走茶凉 提交于 2020-12-13 03:29:17
问题 I have a customActions class: public static ActionResult Register(Session session) { try { Do SOmething } catch (Exception ex) when (ExceptionManager.catchGenericExcetion(ex)) { var responseMessage =ex.ResponseMessage; if (responseMessage.Contains("Maximum apps created")) { session.Log("maximum limit reached"); using Record record = new Record(0); record[0] = "This is an error!Max apps reached"; session.Message(InstallMessage.Error, record); } return ActionResult.Failure; } return

Session.Message not showing pop up message on product installation screen

﹥>﹥吖頭↗ 提交于 2020-12-13 03:29:00
问题 I have a customActions class: public static ActionResult Register(Session session) { try { Do SOmething } catch (Exception ex) when (ExceptionManager.catchGenericExcetion(ex)) { var responseMessage =ex.ResponseMessage; if (responseMessage.Contains("Maximum apps created")) { session.Log("maximum limit reached"); using Record record = new Record(0); record[0] = "This is an error!Max apps reached"; session.Message(InstallMessage.Error, record); } return ActionResult.Failure; } return

Pass command-line arguments to WiX custom action

爱⌒轻易说出口 提交于 2020-07-21 03:25:25
问题 We have a desktop application installed through a windows installer (msi), and we want to add a custom action that relaunches the .exe when we have pass LAUNCH_APP=1 to the cmd . So I have a vbs script that launch a bat file that launch install the msi (major upgrade): vbs script: Set WshShell = CreateObject("WScript.Shell") Const TemporaryFolder = 2 Dim fso: Set fso = CreateObject("Scripting.FileSystemObject") Dim tempFolder: tempFolder = fso.GetSpecialFolder(TemporaryFolder) WshShell.Run

Pass command-line arguments to WiX custom action

时光毁灭记忆、已成空白 提交于 2020-07-21 03:25:09
问题 We have a desktop application installed through a windows installer (msi), and we want to add a custom action that relaunches the .exe when we have pass LAUNCH_APP=1 to the cmd . So I have a vbs script that launch a bat file that launch install the msi (major upgrade): vbs script: Set WshShell = CreateObject("WScript.Shell") Const TemporaryFolder = 2 Dim fso: Set fso = CreateObject("Scripting.FileSystemObject") Dim tempFolder: tempFolder = fso.GetSpecialFolder(TemporaryFolder) WshShell.Run

How to Reproduce MSI Install Error

二次信任 提交于 2020-06-17 13:22:46
问题 There is some way to reproduce/Inject some MSI install error? I would like my install will fail with some error 1xxx/2xxx.. (msi error codes) it doesn't matter which error code, What important that in the MSI logs I will see "Retun value 3". * I am using WIX 回答1: Not 100% sure what you need. Are you testing Windows Installer rollback and wanting to trigger it from your custom action? Or maybe you just want to write something into your MSI log file without triggering rollback? I suppose you