Re: [WiX-users] Getting ProductVersion of an msi from wix
In that situation, and assuming you have a robust file versioning scheme, in all these cases you go ahaead and install the MSI anyway and: 1. Package versions of those files that have lower file versions and will therefore not update the existing higher versioned ones.Apply component rules, and they should be in a common container (such as a merge module) to make sure that you do follow those rules. or 2. Have those files in a feature in their containing MSI and ensure that the feature is not installed (with INSTALLLEVEL perhaps) if that other product is detected. or 3. If the number of files is not cumbersome, make each containing component transitive and dependent on the upgrade detecting an older product. You'll need to re-evaluate the component condition at every operation (such as repair) to ensure those files are not potentially overwritten. This has the potential advantage that if if the other product is uninstalled and you now need those files then a repair would install them. --- Phil Wilson On Tue, May 19, 2015 at 9:04 PM, Rajesh Nagpal rnag...@microsoft.com wrote: Ok Let me try this time to state the problem:) We have a legacy setup installer(based on wix 3.0) that installs the core engine features. We are developing a new setup installer(based on wix 3.8) that installs tools features. Based on the current code they both share a common msi(which is actually an engine msi but contains some of the tools binaries), so I need to package that msi in our tools installer but we also don't want to accidently update the engine components as we rev the tools installer more frequently. So I want to detect this condition and block the setup. We are working long term to fix this correctly by refactoring the code but need to have this check meantime. Let me know if that makes sense now for the problem I'm trying to solve. We don't plan to move to Wix 3.9 very soon just because of the ProductSearch feature since we have a workaround for it but yes, I'll update this logic of doing registry checks once we move to win 3.9 or higher. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600377.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Getting ProductVersion of an msi from wix
Ok Let me try this time to state the problem:) We have a legacy setup installer(based on wix 3.0) that installs the core engine features. We are developing a new setup installer(based on wix 3.8) that installs tools features. Based on the current code they both share a common msi(which is actually an engine msi but contains some of the tools binaries), so I need to package that msi in our tools installer but we also don't want to accidently update the engine components as we rev the tools installer more frequently. So I want to detect this condition and block the setup. We are working long term to fix this correctly by refactoring the code but need to have this check meantime. Let me know if that makes sense now for the problem I'm trying to solve. We don't plan to move to Wix 3.9 very soon just because of the ProductSearch feature since we have a workaround for it but yes, I'll update this logic of doing registry checks once we move to win 3.9 or higher. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600377.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Getting ProductVersion of an msi from wix
To me at least that's not the problem you're describing - that's a restatement of your solution, the implementation of which is to block an MSI install if another product is already installed. Anyway, it looks like you'll need to write code to do this as outlined earlier based on detection of an installed product with that UpgradeCode. Would it be a hardship to move to 3.9 WiX? If there is way of dealing with your problem by doing it in the MSI with an upgrade element to onlydetect the installed product, and have the MSI behave differently then that would be a possible solution, which is why it might help to know the problem your detection of that product is going to solve. --- Phil Wilson On Mon, May 18, 2015 at 4:24 PM, Rajesh Nagpal rnag...@microsoft.com wrote: Hi Phil, Comments inline for your queries: /It might help to say why you want to do this and what problem it solves./ I need to add a blocking condition based on whether a particular msi is installed or not and hence I need a way to figure out whether that msi is installed or not. /You don't mention version either except in the subject line, so some clarification about that might help. / Not sure which version you are talking about. I'm using Wix 3.8 if that's what you wanted to know. I got around this problem by finding a registry that gave me the version(same as product version). Thanks for your response. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600357.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Getting ProductVersion of an msi from wix
Hi Phil, Comments inline for your queries: /It might help to say why you want to do this and what problem it solves./ I need to add a blocking condition based on whether a particular msi is installed or not and hence I need a way to figure out whether that msi is installed or not. /You don't mention version either except in the subject line, so some clarification about that might help. / Not sure which version you are talking about. I'm using Wix 3.8 if that's what you wanted to know. I got around this problem by finding a registry that gave me the version(same as product version). Thanks for your response. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600357.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Getting ProductVersion of an msi from wix
Your original problem was I'm trying to detect where a particular msi is installed or not and based on that I want to block on my burn setup bundle. but that seems more like a solution to a problem you haven't described. It might help to say why you want to do this and what problem it solves. You also say where a particular MSI is installed, but MSIs aren't installed anywhere, so it's unclear what this is about, maybe a file or the browsable install location is what you're asking about. You don't mention version either except in the subject line, so some clarification about that might help. Regarding getting the ProductVersion of an installed product whose ProductCode you don't know, there appears to be no support in the WiX version you're using. If that's the case, then you need to do it yourself. If that MSI product you want to detect is yours, then have it write some info in the registry that you can detect with a search. If it's too late for that, then there is a WiX util ComponentSearch that you could use to look for a Component Id from that MSI and maybe that could tell you a location, if that's what you're looking for. If you need to write custom code in the bootrapper, then MsiEnumRelatedProducts (pass UpgradeCode in) will tell you installed ProductCodes of installed products with that UpgradeCode With that ProductCode you can call APIs like MsiGetProductInfo to get the ProductVersion, and there are managed code interops for these if you prefer C#. --- Phil Wilson On Thu, May 14, 2015 at 5:11 PM, Rajesh Nagpal rnag...@microsoft.com wrote: Thanks Nir for the response! As I mentioned, the ProductCode in my case is changing with every new build of the msi, so I cannot search for it as it's not fixed. I was looking into RegistrySearch and found conflicting info for the Result attribute which is an Enumeration. The documentation says that if I specify it as exists, I'll get either true or false. But the wix I'm using(wix 3.8) I'm getting a return value of 1 or 0. Not sure if that has been changed in the recent past and I'm having an older version. Anyways, I'm using (NOT VariableName) in the Condition so I get the same result whether it returns true or 1, but it would be good to know what's the expected value there. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600332.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Getting ProductVersion of an msi from wix
Use RegistrySearch on Uninstall Registry Key, https://msdn.microsoft.com/en-us/library/aa372105%28v=vs.85%29.aspx DisplayVersion value. - Nir Bar Freelance Developer Mail: nir@panel-sw.com Web: www.panel-sw.com - C++ On Windows, Linux and Embedded Platforms - WiX InstallShield -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600330.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Getting ProductVersion of an msi from wix
Thanks Nir for the response! As I mentioned, the ProductCode in my case is changing with every new build of the msi, so I cannot search for it as it's not fixed. I was looking into RegistrySearch and found conflicting info for the Result attribute which is an Enumeration. The documentation says that if I specify it as exists, I'll get either true or false. But the wix I'm using(wix 3.8) I'm getting a return value of 1 or 0. Not sure if that has been changed in the recent past and I'm having an older version. Anyways, I'm using (NOT VariableName) in the Condition so I get the same result whether it returns true or 1, but it would be good to know what's the expected value there. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600332.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Getting ProductVersion of an msi from wix
I also tried using util:FileSearch giving it the path of one of the files this msi installs but turns out that the Path attribute doesn't takes an absolute path(complains of ':' in the Path). My source code for building this setup bundle lies in a different drive than the drive where this file gets installed(in C:\Program Files), so cannot use relative path here. Am I missing anything? Regards, Rajesh -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Getting-ProductVersion-of-an-msi-from-wix-tp7600320p7600322.html Sent from the wix-users mailing list archive at Nabble.com. -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users