dtf

Get component code using WiX DTF

吃可爱长大的小学妹 提交于 2019-12-08 05:47:22
问题 I have been trying to find a way to get a Windows Installer component code given a product code. (I'm actually trying to get the component path for an installed product using a shortcut that doesn't contain the component code, but this is a longer story.) I have come across the WiX DTF (Microsoft.Deployment.WindowsInstaller) assembly and this looks like a nice way to get MSI stuff done. I was very hopeful when I wrote the following code: Session product = Installer.OpenProduct(productCode);

Get feature installation cost prior to installation

流过昼夜 提交于 2019-12-08 03:19:04
问题 We're making a custom boostrapper / external UI for our installation. We want to provide a "Custom Installation" dialog (like in MSI) to allow the user to choose feature(s) they want to install or remove. Currently, we are able to read the features (and other feature details like description) from the MSI database itself (by running an SQL query on the Feature table). However, we also want to display the cost of installing a feature. Windows Installer "Custom Installation" dialog is capable

WIX custom action: use dllimport

…衆ロ難τιáo~ 提交于 2019-12-02 20:40:30
问题 I have a WiX installer and Custom Actions project. I added C# library as reference to Custom action's project. This C# dll uses DllImport to one C++ dll. When installing I receive error: cannot load DLL mycpp.dll : specified module not found. I added mycpp.dll to CA project and tried using properties : embedded resource, copy to output directory - but no result. How can I make my installer find mycpp.dll ? 回答1: I've had this issue before. After reading through the MSBuild files for wix I

WIX custom action: use dllimport

此生再无相见时 提交于 2019-12-02 10:23:41
I have a WiX installer and Custom Actions project. I added C# library as reference to Custom action's project. This C# dll uses DllImport to one C++ dll. When installing I receive error: cannot load DLL mycpp.dll : specified module not found. I added mycpp.dll to CA project and tried using properties : embedded resource, copy to output directory - but no result. How can I make my installer find mycpp.dll ? I've had this issue before. After reading through the MSBuild files for wix I eventually found a property that is used as a list for the dlls needed in the self-extracting package that

MessageBoxes using DTF

江枫思渺然 提交于 2019-11-30 23:19:52
The MsiProcessMessage function doco on MSDN shows this example: PMSIHANDLE hInstall; PMSIHANDLE hRec; MsiProcessMessage(hInstall, INSTALLMESSAGE(INSTALLMESSAGE_ERROR|MB_ABORTRETRYIGNORE|MB_ICONWARNING), hRec); How would this be done using Session.Message in DTF? The only overload takes Session.InstallMessage as an argument. I see the MessageBoxButtons enum and I convert both types to In32 and perform a logical or but I'm not sure how to get this back into the API. Am I missing something or is DTF missing something? I've not done much with DTF but my understanding is that you'd want something

MessageBoxes using DTF

时光怂恿深爱的人放手 提交于 2019-11-30 18:17:38
问题 The MsiProcessMessage function doco on MSDN shows this example: PMSIHANDLE hInstall; PMSIHANDLE hRec; MsiProcessMessage(hInstall, INSTALLMESSAGE(INSTALLMESSAGE_ERROR|MB_ABORTRETRYIGNORE|MB_ICONWARNING), hRec); How would this be done using Session.Message in DTF? The only overload takes Session.InstallMessage as an argument. I see the MessageBoxButtons enum and I convert both types to In32 and perform a logical or but I'm not sure how to get this back into the API. Am I missing something or is

How to programmatically read the properties inside an MSI file?

≯℡__Kan透↙ 提交于 2019-11-27 23:16:41
Is there any way to read the properties inside the msi file? For example given a msi file name Testpackage.msi I need to find productName PackageCode version This I am going to use it with WMI uninstall string objPath = string.Format("Win32_Product.IdentifyingNumber='{0}',Name='{1}',Version='{2}'", "{AC9C1263-2BA8-4863-BE18-01232375CE42}", "testproduct", "10.0.0.0"); Update: Using Orca is a great option, if this can be achieved programatically, then I can use this to generate automatic release notes. and in un-install program too. Arnout You can use the COM-based API for working with MSI , and

Programmatically installing MSI packages

妖精的绣舞 提交于 2019-11-27 08:25:57
I would like to install a given .msi package programmatically from my C# .NET application, preferably with the installation parameters that my application specifies (like the installation path, decline crapware, etc.). I did some searches, but I haven't really found anything useful. The most promising hit was this topic , but I cannot find any documentation of Microsoft.Deployment.WindowsInstaller or of WindowsInstaller.Installer for that matter. I find the Deployment Tools Foundation project mentioned above to be a solid way to do this from .NET. Having referenced Microsoft.Deployment

Programmatically installing MSI packages

我是研究僧i 提交于 2019-11-26 18:22:07
问题 I would like to install a given .msi package programmatically from my C# .NET application, preferably with the installation parameters that my application specifies (like the installation path, decline crapware, etc.). I did some searches, but I haven't really found anything useful. The most promising hit was this topic, but I cannot find any documentation of Microsoft.Deployment.WindowsInstaller or of WindowsInstaller.Installer for that matter. 回答1: I find the Deployment Tools Foundation

How to programmatically read the properties inside an MSI file?

半腔热情 提交于 2019-11-26 16:56:27
问题 Is there any way to read the properties inside the msi file? For example given a msi file name Testpackage.msi I need to find productName PackageCode version This I am going to use it with WMI uninstall string objPath = string.Format("Win32_Product.IdentifyingNumber='{0}',Name='{1}',Version='{2}'", "{AC9C1263-2BA8-4863-BE18-01232375CE42}", "testproduct", "10.0.0.0"); Update: Using Orca is a great option, if this can be achieved programatically, then I can use this to generate automatic