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:
<InstallUISequence>
<Custom Action="" Before="LaunchConditions" /> </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 <CustomAction> 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
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 Frankly, with
multi-lingual UI support (especially multiple preference levels in 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 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."><![CDATA[SystemDefaultUILanguage = $(var.LCID)OR
SystemDefaultUILanguage <> 1033]]></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