Re: [WiX-users] Detect VC++ runtime version on target system
1. Not quite sure how to answer that... MsiQueryProductState is a standard Win32 API call that can be done from C++ or from managed code using P/Invoke. 2. I don't know enough about the WiX bootstrapper to answer, but I assume it can detect ProductCodes and install something if that ProductCode is not installed. Phil W -Original Message- From: Helge Kruse [mailto:helge.kr...@gmx.net] Sent: Monday, December 12, 2011 10:29 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Detect VC++ runtime version on target system Phil, Thanks for reply. Do you refer to this 1. Call the MsiQueryProductState <http://msdn2.microsoft.com/en-gb/library/aa370363.aspx> API 2. Pass in the product code for the package that you want to detect based on the list below 3. Check the return value of this API. If it is anything other than INSTALLSTATE_DEFAULT, the package is not yet installed How do I call this API? Aaron describes this as the procedure in the VS2005 redistributable bootstrapper. - How do I add this to the wixproj file that defines the bootstrapper built with Votive and MSBuild? - How can I ensure in my .MSI that the bootstrapper has been started to install the redistributable if necessary? But this article and the link to the corresponding VS2005 article http://blogs.msdn.com/b/astebner/archive/2007/01/16/mailbag-how-to-detect-the-presence-of-the-vc-8-0-runtime-redistributable-package.aspx show some GUIDs that I found after installing the redistributable version. This could be used to find it in the registry. But I would use a better approach if possible. Regards, Helge Am 12.12.2011 21:53, schrieb Wilson, Phil: > You need something like this, not a registry search. > > http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx > > Phil W > > > From: Helge Kruse [helge.kr...@gmx.net] > Sent: Sunday, December 11, 2011 11:11 AM > To:wix-users@lists.sourceforge.net > Subject: [WiX-users] Detect VC++ runtime version on target system > > The WiX help recommends to deploy the Visual C++ runtime using merge > modules. I refer to section "How To: Install the Visual C++ > Redistributable with your installer". While this is possible, I don't > want to include the MSM in every MSI I will generate. Instead I prefer > to add this to the bootstrapper with Votive and MSBuild. > > But this would allow installing a C++ program that might will not run, > when the bootstrapper is not used but the MSI is ran directly. Therefore > I would like to check if the required version of the C++ run time is > installed on the target system. This could be done with a > RegistrySearch. But this allows only accessing registry values. I would > like to do something like this: > > > Key="SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_e889b656\downlevel_manifest.8.0.50727.4407" > Name="?" Type"=raw" /> > > > > > > > How can the condition distinguish between "an empty default value" and > "key not in registry"? > How can this test achieved? > What is the best way to check that the required or a newer version of > the VC++ runtime is installed? > > Regards, > Helge > -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users *** Confidentiality Notice: This e-mail, including any associated or attached files, is intended solely for the individual or entity to which it is addressed. This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. This email comes from a division of the Invensys Group, owned by Invensys plc, which is a company registered in England and Wales with its registered office at 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx. You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail recept...@invensys.
Re: [WiX-users] Detect VC++ runtime version on target system
You're right. You need to distribute the C++ redistributable in that version that you used for the build of your program. But this redistributable should be on your build machine, when you have installed the VS update. But the question that I had at the beginning of the thread is, when you don't have the C++ runtime MSM in your MSI, you need to check, if the appropriate version of the C++ runtime is installed at the target system. Your MSI should not install if the runtime version does not match. How can this check be performed? Helge Am 13.12.2011 12:22, schrieb Pally Sandher: > One of the problems I've noticed from using the redistributable of the Visual > C++ runtimes is that when there are updates released by Microsoft, the next > build of your application needs to be shipped with the new version of the > redistributable. > If you only ever use major upgrades this shouldn't be a problem but if you're > intending on patching then your patch needs to bootstrap the new > redistributable for your application to work after patching which bloats the > size of your patch. > Hence I'm switching back to using merge modules instead of bootstrapping the > redistributable even though I'll still be bootstrapping the .NET 4.0 client > profile for our next release as the patching process takes care of all the > heavy lifting where the VC++ runtimes are concerned then. > > Palbinder Sandher > Software Platform Engineer > T:+44 (0) 141 945 8500 > F:+44 (0) 141 945 8501 > http://www.iesve.com > > **Design, Simulate + Innovate with the** > Integrated Environmental Solutions Limited. Registered in Scotland No. > SC151456 > Registered Office - Helix Building, West Of Scotland Science Park, Glasgow > G20 0SP > Email Disclaimer > > > > -Original Message- > From: Helge Kruse [mailto:helge.kr...@gmx.net] > Sent: 13 December 2011 06:34 > To: wix-users@lists.sourceforge.net > Subject: Re: [WiX-users] Detect VC++ runtime version on target system > > Phil, > > Thanks for reply. Do you refer to this > > 1. Call the MsiQueryProductState ><http://msdn2.microsoft.com/en-gb/library/aa370363.aspx> API > 2. Pass in the product code for the package that you want to detect >based on the list below > 3. Check the return value of this API. If it is anything other than >INSTALLSTATE_DEFAULT, the package is not yet installed > > How do I call this API? Aaron describes this as the procedure in the > VS2005 redistributable bootstrapper. > - How do I add this to the wixproj file that defines the bootstrapper > built with Votive and MSBuild? > - How can I ensure in my .MSI that the bootstrapper has been started to > install the redistributable if necessary? > > But this article and the link to the corresponding VS2005 article > http://blogs.msdn.com/b/astebner/archive/2007/01/16/mailbag-how-to-detect-the-presence-of-the-vc-8-0-runtime-redistributable-package.aspx > show some GUIDs that I found after installing the redistributable > version. This could be used to find it in the registry. But I would use > a better approach if possible. > > Regards, > Helge > > Am 12.12.2011 21:53, schrieb Wilson, Phil: > >> You need something like this, not a registry search. >> >> http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx >> >> Phil W >> >> >> From: Helge Kruse [helge.kr...@gmx.net] >> Sent: Sunday, December 11, 2011 11:11 AM >> To:wix-users@lists.sourceforge.net >> Subject: [WiX-users] Detect VC++ runtime version on target system >> >> The WiX help recommends to deploy the Visual C++ runtime using merge >> modules. I refer to section "How To: Install the Visual C++ >> Redistributable with your installer". While this is possible, I don't >> want to include the MSM in every MSI I will generate. Instead I prefer >> to add this to the bootstrapper with Votive and MSBuild. >> >> But this would allow installing a C++ program that might will not run, >> when the bootstrapper is not used but the MSI is ran directly. Therefore >> I would like to check if the required version of the C++ run time is >> installed on the target system. This could be done with a >> RegistrySearch. But this allows only accessing registry values. I would >> like to do something like this: >> >> >> > Key="SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_e889b656\downlevel_manifest.8.0.50727.4407" >> Name="?" Type"=raw" /> >> >>
Re: [WiX-users] Detect VC++ runtime version on target system
One of the problems I've noticed from using the redistributable of the Visual C++ runtimes is that when there are updates released by Microsoft, the next build of your application needs to be shipped with the new version of the redistributable. If you only ever use major upgrades this shouldn't be a problem but if you're intending on patching then your patch needs to bootstrap the new redistributable for your application to work after patching which bloats the size of your patch. Hence I'm switching back to using merge modules instead of bootstrapping the redistributable even though I'll still be bootstrapping the .NET 4.0 client profile for our next release as the patching process takes care of all the heavy lifting where the VC++ runtimes are concerned then. Palbinder Sandher Software Platform Engineer T:+44 (0) 141 945 8500 F:+44 (0) 141 945 8501 http://www.iesve.com **Design, Simulate + Innovate with the ** Integrated Environmental Solutions Limited. Registered in Scotland No. SC151456 Registered Office - Helix Building, West Of Scotland Science Park, Glasgow G20 0SP Email Disclaimer -Original Message- From: Helge Kruse [mailto:helge.kr...@gmx.net] Sent: 13 December 2011 06:34 To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Detect VC++ runtime version on target system Phil, Thanks for reply. Do you refer to this 1. Call the MsiQueryProductState <http://msdn2.microsoft.com/en-gb/library/aa370363.aspx> API 2. Pass in the product code for the package that you want to detect based on the list below 3. Check the return value of this API. If it is anything other than INSTALLSTATE_DEFAULT, the package is not yet installed How do I call this API? Aaron describes this as the procedure in the VS2005 redistributable bootstrapper. - How do I add this to the wixproj file that defines the bootstrapper built with Votive and MSBuild? - How can I ensure in my .MSI that the bootstrapper has been started to install the redistributable if necessary? But this article and the link to the corresponding VS2005 article http://blogs.msdn.com/b/astebner/archive/2007/01/16/mailbag-how-to-detect-the-presence-of-the-vc-8-0-runtime-redistributable-package.aspx show some GUIDs that I found after installing the redistributable version. This could be used to find it in the registry. But I would use a better approach if possible. Regards, Helge Am 12.12.2011 21:53, schrieb Wilson, Phil: > You need something like this, not a registry search. > > http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx > > Phil W > > > From: Helge Kruse [helge.kr...@gmx.net] > Sent: Sunday, December 11, 2011 11:11 AM > To:wix-users@lists.sourceforge.net > Subject: [WiX-users] Detect VC++ runtime version on target system > > The WiX help recommends to deploy the Visual C++ runtime using merge > modules. I refer to section "How To: Install the Visual C++ > Redistributable with your installer". While this is possible, I don't > want to include the MSM in every MSI I will generate. Instead I prefer > to add this to the bootstrapper with Votive and MSBuild. > > But this would allow installing a C++ program that might will not run, > when the bootstrapper is not used but the MSI is ran directly. Therefore > I would like to check if the required version of the C++ run time is > installed on the target system. This could be done with a > RegistrySearch. But this allows only accessing registry values. I would > like to do something like this: > > > Key="SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_e889b656\downlevel_manifest.8.0.50727.4407" > Name="?" Type"=raw" /> > > > > > > > How can the condition distinguish between "an empty default value" and > "key not in registry"? > How can this test achieved? > What is the best way to check that the required or a newer version of > the VC++ runtime is installed? > > Regards, > Helge > -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service
Re: [WiX-users] Detect VC++ runtime version on target system
Phil, Thanks for reply. Do you refer to this 1. Call the MsiQueryProductState <http://msdn2.microsoft.com/en-gb/library/aa370363.aspx> API 2. Pass in the product code for the package that you want to detect based on the list below 3. Check the return value of this API. If it is anything other than INSTALLSTATE_DEFAULT, the package is not yet installed How do I call this API? Aaron describes this as the procedure in the VS2005 redistributable bootstrapper. - How do I add this to the wixproj file that defines the bootstrapper built with Votive and MSBuild? - How can I ensure in my .MSI that the bootstrapper has been started to install the redistributable if necessary? But this article and the link to the corresponding VS2005 article http://blogs.msdn.com/b/astebner/archive/2007/01/16/mailbag-how-to-detect-the-presence-of-the-vc-8-0-runtime-redistributable-package.aspx show some GUIDs that I found after installing the redistributable version. This could be used to find it in the registry. But I would use a better approach if possible. Regards, Helge Am 12.12.2011 21:53, schrieb Wilson, Phil: > You need something like this, not a registry search. > > http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx > > Phil W > > > From: Helge Kruse [helge.kr...@gmx.net] > Sent: Sunday, December 11, 2011 11:11 AM > To:wix-users@lists.sourceforge.net > Subject: [WiX-users] Detect VC++ runtime version on target system > > The WiX help recommends to deploy the Visual C++ runtime using merge > modules. I refer to section "How To: Install the Visual C++ > Redistributable with your installer". While this is possible, I don't > want to include the MSM in every MSI I will generate. Instead I prefer > to add this to the bootstrapper with Votive and MSBuild. > > But this would allow installing a C++ program that might will not run, > when the bootstrapper is not used but the MSI is ran directly. Therefore > I would like to check if the required version of the C++ run time is > installed on the target system. This could be done with a > RegistrySearch. But this allows only accessing registry values. I would > like to do something like this: > > > Key="SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Installations\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_e889b656\downlevel_manifest.8.0.50727.4407" > Name="?" Type"=raw" /> > > > > > > > How can the condition distinguish between "an empty default value" and > "key not in registry"? > How can this test achieved? > What is the best way to check that the required or a newer version of > the VC++ runtime is installed? > > Regards, > Helge > -- Systems Optimization Self Assessment Improve efficiency and utilization of IT resources. Drive out cost and improve service delivery. Take 5 minutes to use this Systems Optimization Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Detect VC++ runtime version on target system
Looks like VC++ runtime does not create those keys, only Visual Studio install does. -Original Message- From: Wilson, Phil [mailto:phil.wil...@invensys.com] Sent: Monday, December 12, 2011 14:53 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Detect VC++ runtime version on target system You need something like this, not a registry search. http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx Phil W From: Helge Kruse [helge.kr...@gmx.net] Sent: Sunday, December 11, 2011 11:11 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Detect VC++ runtime version on target system The WiX help recommends to deploy the Visual C++ runtime using merge modules. I refer to section "How To: Install the Visual C++ Redistributable with your installer". While this is possible, I don't want to include the MSM in every MSI I will generate. Instead I prefer to add this to the bootstrapper with Votive and MSBuild. But this would allow installing a C++ program that might will not run, when the bootstrapper is not used but the MSI is ran directly. Therefore I would like to check if the required version of the C++ run time is installed on the target system. This could be done with a RegistrySearch. But this allows only accessing registry values. I would like to do something like this: How can the condition distinguish between "an empty default value" and "key not in registry"? How can this test achieved? What is the best way to check that the required or a newer version of the VC++ runtime is installed? Regards, Helge -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users *** Confidentiality Notice: This e-mail, including any associated or attached files, is intended solely for the individual or entity to which it is addressed. This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. This email comes from a division of the Invensys Group, owned by Invensys plc, which is a company registered in England and Wales with its registered office at 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx. You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail recept...@invensys.com. This e-mail and any attachments thereto may be subject to the terms of any agreements between Invensys (and/or its subsidiaries and affiliates) and the recipient (and/or its subsidiaries and affiliates). -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Detect VC++ runtime version on target system
You need something like this, not a registry search. http://blogs.msdn.com/b/astebner/archive/2010/05/05/10008146.aspx Phil W From: Helge Kruse [helge.kr...@gmx.net] Sent: Sunday, December 11, 2011 11:11 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Detect VC++ runtime version on target system The WiX help recommends to deploy the Visual C++ runtime using merge modules. I refer to section "How To: Install the Visual C++ Redistributable with your installer". While this is possible, I don't want to include the MSM in every MSI I will generate. Instead I prefer to add this to the bootstrapper with Votive and MSBuild. But this would allow installing a C++ program that might will not run, when the bootstrapper is not used but the MSI is ran directly. Therefore I would like to check if the required version of the C++ run time is installed on the target system. This could be done with a RegistrySearch. But this allows only accessing registry values. I would like to do something like this: How can the condition distinguish between "an empty default value" and "key not in registry"? How can this test achieved? What is the best way to check that the required or a newer version of the VC++ runtime is installed? Regards, Helge -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users *** Confidentiality Notice: This e-mail, including any associated or attached files, is intended solely for the individual or entity to which it is addressed. This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. This email comes from a division of the Invensys Group, owned by Invensys plc, which is a company registered in England and Wales with its registered office at 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx. You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail recept...@invensys.com. This e-mail and any attachments thereto may be subject to the terms of any agreements between Invensys (and/or its subsidiaries and affiliates) and the recipient (and/or its subsidiaries and affiliates). -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] Detect VC++ runtime version on target system
The WiX help recommends to deploy the Visual C++ runtime using merge modules. I refer to section "How To: Install the Visual C++ Redistributable with your installer". While this is possible, I don't want to include the MSM in every MSI I will generate. Instead I prefer to add this to the bootstrapper with Votive and MSBuild. But this would allow installing a C++ program that might will not run, when the bootstrapper is not used but the MSI is ran directly. Therefore I would like to check if the required version of the C++ run time is installed on the target system. This could be done with a RegistrySearch. But this allows only accessing registry values. I would like to do something like this: How can the condition distinguish between "an empty default value" and "key not in registry"? How can this test achieved? What is the best way to check that the required or a newer version of the VC++ runtime is installed? Regards, Helge -- Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users