Re: [WiX-users] Problem with install condition based on lang ID
Ok I have changed my installUIsequence to the following: <InstallUISequence> <Custom Action="TabletPcCheck" After="AppSearch" /> ß another custom action verifing we are on tablet sku <Custom Action="LanguageChecker" Sequence="97" Before="LaunchConditions" Execute='firstSequence' /> <LaunchConditions After="TabletPcCheck" /> I have also changed the custom DLL to support the logging.. I am now going to re-test this and see what I get. Quick question, I have run a debug MSI install for awhile.. can you link me to the steps to enable debug capture ? Thank you, Jeff P.S. Thanks for all the help.. I inherited this stuff L From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Dimmick Sent: Tuesday, September 19, 2006 9:47 AM To: Jeff MacDuff; wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Problem with install condition based on lang ID No, I actually tried this and it looks like the Windows Installer condition parser can cope (I'm not sure what would happen if you actually wanted to test against the string '1031OR'). Still, adding the space can't hurt. I suspect your problem is what Bob suggested: that you haven't scheduled your custom action, or it's scheduled after LaunchConditions. You should add it to the InstallUISequence: If you plan to support unattended, no-UI installs, you probably also need to add it to the InstallExecuteSequence as well. You might as well add the Execute='firstSequence' attribute to the too so that it only gets run once regardless of whether the UI sequence is suppressed or not. I added logging using MsiRecordSetString and MsiProcessMessage to my version of the custom action DLL so I could see in the log what SystemDefaultUILanguage was being set to. I borrowed this code from Phil Wilson's "Definitive Guide to Windows Installer": UINT LogMessage( MSIHANDLE hInstall, LPCTSTR szMsg ) { PMSIHANDLE hRecord = MsiCreateRecord( 1 ); MsiRecordSetString( hRecord, 0, szMsg ); MsiProcessMessage( hInstall, INSTALLMESSAGE(INSTALLMESSAGE_INFO), hRecord ); return ERROR_SUCCESS; } -- Mike Dimmick From: Jeff MacDuff [mailto:[EMAIL PROTECTED] Sent: 19 September 2006 17:33 To: Mike Dimmick; wix-users@lists.sourceforge.net Subject: RE: [WiX-users] Problem with install condition based on lang ID I understand the design considerations regarding lang ID and so fourth. The problem is I recently inherited this code and we are not at a point in the project where I have the time to re-do the setup for this release.. believe me for the next release it will be 100% different. Anyway, so I fired up orca and took a look at my german MSI I see my custom action listed in CustomAction table In the property table I see LCID is set to 1031 In the Launch Condition table I see this: “SystemDefaultUILanguage = 1031OR SystemDefaultUILanguage <> 1033” So do you think that space inbetwen the 1031 and the or is the problem? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Dimmick Sent: Tuesday, September 19, 2006 2:57 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Problem with install condition based on lang ID Frankly, with multi-lingual UI support (especially multiple preference levels in Vista - see GetSystemPreferredUILanguages) you probably shouldn't do this at all. Allow any version to install on any system. Allow multiple versions to be installed side-by-side, or move to a single binary plus language packs. You might be running on a Terminal Server installed from a localized (non-US-English) CD which supports users using a different non-English UI language - I believe this is possible. Michael Kaplan (GIFT team) was pretty critical when MSN Toolbar Beta did this (http://blogs.msdn.com/michkap/archive/2005/02/03/366698.aspx). If you want to ensure that the UI can actually be read - that the fonts required to render it are installed - then you're asking a different question. See http://www.microsoft.com/globaldev/drintl/columns/009/default.mspx#EHF for more. Actually, it looks like you're missing a space after $(var.LCID), which if WIX is simply doing a macro replacement could cause your condition to be: SystemDefaultUILanguage = 1025OR SystemDefaultUILanguage <> 1033 which won't make any sense to Windows Installer. Try editing the MSI with Orca to see if this is what's happened. -- Mike Dimmick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff MacDuff Sent: 19 September 2006 04:42 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Problem with install condition based on lang ID I
Re: [WiX-users] Problem with install condition based on lang ID
No, I actually tried this and it looks like the Windows Installer condition parser can cope (I'm not sure what would happen if you actually wanted to test against the string '1031OR'). Still, adding the space can't hurt. I suspect your problem is what Bob suggested: that you haven't scheduled your custom action, or it's scheduled after LaunchConditions. You should add it to the InstallUISequence: If you plan to support unattended, no-UI installs, you probably also need to add it to the InstallExecuteSequence as well. You might as well add the Execute='firstSequence' attribute to the too so that it only gets run once regardless of whether the UI sequence is suppressed or not. I added logging using MsiRecordSetString and MsiProcessMessage to my version of the custom action DLL so I could see in the log what SystemDefaultUILanguage was being set to. I borrowed this code from Phil Wilson's "Definitive Guide to Windows Installer": UINT LogMessage( MSIHANDLE hInstall, LPCTSTR szMsg ){ PMSIHANDLE hRecord = MsiCreateRecord( 1 ); MsiRecordSetString( hRecord, 0, szMsg ); MsiProcessMessage( hInstall, INSTALLMESSAGE(INSTALLMESSAGE_INFO), hRecord ); return ERROR_SUCCESS;} -- Mike Dimmick From: Jeff MacDuff [mailto:[EMAIL PROTECTED] Sent: 19 September 2006 17:33To: Mike Dimmick; wix-users@lists.sourceforge.netSubject: RE: [WiX-users] Problem with install condition based on lang ID I understand the design considerations regarding lang ID and so fourth. The problem is I recently inherited this code and we are not at a point in the project where I have the time to re-do the setup for this release.. believe me for the next release it will be 100% different. Anyway, so I fired up orca and took a look at my german MSI I see my custom action listed in CustomAction table In the property table I see LCID is set to 1031 In the Launch Condition table I see this: “SystemDefaultUILanguage = 1031OR SystemDefaultUILanguage <> 1033” So do you think that space inbetwen the 1031 and the or is the problem? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike DimmickSent: Tuesday, September 19, 2006 2:57 AMTo: wix-users@lists.sourceforge.netSubject: Re: [WiX-users] Problem with install condition based on lang ID Frankly, with multi-lingual UI support (especially multiple preference levels in Vista - see GetSystemPreferredUILanguages) you probably shouldn't do this at all. Allow any version to install on any system. Allow multiple versions to be installed side-by-side, or move to a single binary plus language packs. You might be running on a Terminal Server installed from a localized (non-US-English) CD which supports users using a different non-English UI language - I believe this is possible. Michael Kaplan (GIFT team) was pretty critical when MSN Toolbar Beta did this (http://blogs.msdn.com/michkap/archive/2005/02/03/366698.aspx). If you want to ensure that the UI can actually be read - that the fonts required to render it are installed - then you're asking a different question. See http://www.microsoft.com/globaldev/drintl/columns/009/default.mspx#EHF for more. Actually, it looks like you're missing a space after $(var.LCID), which if WIX is simply doing a macro replacement could cause your condition to be: SystemDefaultUILanguage = 1025OR SystemDefaultUILanguage <> 1033 which won't make any sense to Windows Installer. Try editing the MSI with Orca to see if this is what's happened. -- Mike Dimmick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff MacDuffSent: 19 September 2006 04:42To: wix-users@lists.sourceforge.netSubject: [WiX-users] Problem with install condition based on lang ID I am having trouble getting an install condition based on land ID to work… I have consulted the WIX doc’s and my implementation seems to be correct but since it’s not working I am missing something. We are building a Multilanguage MSI for a small product and we wish to only allow install on the language of the MSI AND English but not a different language. For example a Korean (KOR) MSI should be able to install on a Korean language OS and an English (ENU) language OS but not a German(DEU) language OS. At the same time, a DEU MSI should install on English and German (DEU) but not on a Korean (KOR ) OS ,etc… you get the idea. My condition statement is formatted like this: <Condition Message="You cannot install this version of because it is not compatible with your language version of Windows. Obtain the language version that matches the language version of Windows running on this PC.">Condition> Var.LCID is passed in as the build language and 103
Re: [WiX-users] Problem with install condition based on lang ID
I understand the design considerations regarding lang ID and so fourth. The problem is I recently inherited this code and we are not at a point in the project where I have the time to re-do the setup for this release.. believe me for the next release it will be 100% different. Anyway, so I fired up orca and took a look at my german MSI I see my custom action listed in CustomAction table In the property table I see LCID is set to 1031 In the Launch Condition table I see this: “SystemDefaultUILanguage = 1031OR SystemDefaultUILanguage <> 1033” So do you think that space inbetwen the 1031 and the or is the problem? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Dimmick Sent: Tuesday, September 19, 2006 2:57 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Problem with install condition based on lang ID Frankly, with multi-lingual UI support (especially multiple preference levels in Vista - see GetSystemPreferredUILanguages) you probably shouldn't do this at all. Allow any version to install on any system. Allow multiple versions to be installed side-by-side, or move to a single binary plus language packs. You might be running on a Terminal Server installed from a localized (non-US-English) CD which supports users using a different non-English UI language - I believe this is possible. Michael Kaplan (GIFT team) was pretty critical when MSN Toolbar Beta did this (http://blogs.msdn.com/michkap/archive/2005/02/03/366698.aspx). If you want to ensure that the UI can actually be read - that the fonts required to render it are installed - then you're asking a different question. See http://www.microsoft.com/globaldev/drintl/columns/009/default.mspx#EHF for more. Actually, it looks like you're missing a space after $(var.LCID), which if WIX is simply doing a macro replacement could cause your condition to be: SystemDefaultUILanguage = 1025OR SystemDefaultUILanguage <> 1033 which won't make any sense to Windows Installer. Try editing the MSI with Orca to see if this is what's happened. -- Mike Dimmick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff MacDuff Sent: 19 September 2006 04:42 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Problem with install condition based on lang ID I am having trouble getting an install condition based on land ID to work… I have consulted the WIX doc’s and my implementation seems to be correct but since it’s not working I am missing something. We are building a Multilanguage MSI for a small product and we wish to only allow install on the language of the MSI AND English but not a different language. For example a Korean (KOR) MSI should be able to install on a Korean language OS and an English (ENU) language OS but not a German(DEU) language OS. At the same time, a DEU MSI should install on English and German (DEU) but not on a Korean (KOR ) OS ,etc… you get the idea. My condition statement is formatted like this: <Condition Message="You cannot install this version of because it is not compatible with your language version of Windows. Obtain the language version that matches the language version of Windows running on this PC.">Condition> Var.LCID is passed in as the build language and 1033 is of course English. What we are seeing is that the MSI’s can install everywhere. Thanks for help, Jeff - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Problem with install condition based on lang ID
Frankly, with multi-lingual UI support (especially multiple preference levels in Vista - see GetSystemPreferredUILanguages) you probably shouldn't do this at all. Allow any version to install on any system. Allow multiple versions to be installed side-by-side, or move to a single binary plus language packs. You might be running on a Terminal Server installed from a localized (non-US-English) CD which supports users using a different non-English UI language - I believe this is possible. Michael Kaplan (GIFT team) was pretty critical when MSN Toolbar Beta did this (http://blogs.msdn.com/michkap/archive/2005/02/03/366698.aspx). If you want to ensure that the UI can actually be read - that the fonts required to render it are installed - then you're asking a different question. See http://www.microsoft.com/globaldev/drintl/columns/009/default.mspx#EHF for more. Actually, it looks like you're missing a space after $(var.LCID), which if WIX is simply doing a macro replacement could cause your condition to be: SystemDefaultUILanguage = 1025OR SystemDefaultUILanguage <> 1033 which won't make any sense to Windows Installer. Try editing the MSI with Orca to see if this is what's happened. -- Mike Dimmick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff MacDuffSent: 19 September 2006 04:42To: wix-users@lists.sourceforge.netSubject: [WiX-users] Problem with install condition based on lang ID I am having trouble getting an install condition based on land ID to work… I have consulted the WIX doc’s and my implementation seems to be correct but since it’s not working I am missing something. We are building a Multilanguage MSI for a small product and we wish to only allow install on the language of the MSI AND English but not a different language. For example a Korean (KOR) MSI should be able to install on a Korean language OS and an English (ENU) language OS but not a German(DEU) language OS. At the same time, a DEU MSI should install on English and German (DEU) but not on a Korean (KOR ) OS ,etc… you get the idea. My condition statement is formatted like this: <Condition Message="You cannot install this version of because it is not compatible with your language version of Windows. Obtain the language version that matches the language version of Windows running on this PC.">Condition> Var.LCID is passed in as the build language and 1033 is of course English. What we are seeing is that the MSI’s can install everywhere. Thanks for help, Jeff - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Problem with install condition based on lang ID
I will run a verbose install tomorrow and see what the return is. From: Bob Arnson [mailto:[EMAIL PROTECTED] Sent: Monday, September 18, 2006 9:33 PM To: Jeff MacDuff Cc: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Problem with install condition based on lang ID Jeff MacDuff wrote: It’s being set through a custom Action: <CustomAction Id="LanguageChecker" BinaryKey="CustomDLL" DllEntry="SystemDefaultUILanguage" /> What does a verbose log show it's being set to? More important is the timing; make sure the CA is scheduled before LaunchConditions. Perhaps there is a method to get the UI lang within the MSI itself and not use the custom action? There's SystemLanguageID, but that uses GetSystemDefaultLangID. -- sig://boBhttp://bobs.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Problem with install condition based on lang ID
Jeff MacDuff wrote: It’s being set through a custom Action:What does a verbose log show it's being set to? More important is the timing; make sure the CA is scheduled before LaunchConditions. Perhaps there is a method to get the UI lang within the MSI itself and not use the custom action? There's SystemLanguageID, but that uses GetSystemDefaultLangID. -- sig://boB http://bobs.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Problem with install condition based on lang ID
It’s being set through a custom Action: <CustomAction Id="LanguageChecker" BinaryKey="CustomDLL" DllEntry="SystemDefaultUILanguage" /> Which is basiccly this code (snipped a bit) LANGID langId = ::GetSystemDefaultUILanguage(); TCHAR szLang[10] = {0}; _itot((UINT)langId, szLang, 10); MsiSetProperty(hMSI, TEXT("SystemDefaultUILanguage"), szLang); Perhaps there is a method to get the UI lang within the MSI itself and not use the custom action? -Jeff From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Arnson Sent: Monday, September 18, 2006 9:11 PM To: Jeff MacDuff Cc: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Problem with install condition based on lang ID Jeff MacDuff wrote: My condition statement is formatted like this: <Condition Message="You cannot install this version of because it is not compatible with your language version of Windows. Obtain the language version that matches the language version of Windows running on this PC.">Condition> Var.LCID is passed in as the build language and 1033 is of course English. What we are seeing is that the MSI’s can install everywhere. How are you setting SystemDefaultUILanguage? If it's not set, "SystemDefaultUILanguage <> 1033" evaluates to true. -- sig://boBhttp://bobs.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Problem with install condition based on lang ID
Jeff MacDuff wrote: My condition statement is formatted like this:Condition> Var.LCID is passed in as the build language and 1033 is of course English. What we are seeing is that the MSI’s can install everywhere. How are you setting SystemDefaultUILanguage? If it's not set, "SystemDefaultUILanguage <> 1033" evaluates to true. -- sig://boB http://bobs.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] Problem with install condition based on lang ID
I am having trouble getting an install condition based on land ID to work… I have consulted the WIX doc’s and my implementation seems to be correct but since it’s not working I am missing something. We are building a Multilanguage MSI for a small product and we wish to only allow install on the language of the MSI AND English but not a different language. For example a Korean (KOR) MSI should be able to install on a Korean language OS and an English (ENU) language OS but not a German(DEU) language OS. At the same time, a DEU MSI should install on English and German (DEU) but not on a Korean (KOR ) OS ,etc… you get the idea. My condition statement is formatted like this:Condition> Var.LCID is passed in as the build language and 1033 is of course English. What we are seeing is that the MSI’s can install everywhere. Thanks for help, Jeff - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users