Hi Lian,

Our installer had a similar situation. The approach we went for was:

1) Create a custom action VBScript that runs early on in your installer to do 
the following:
    - Look up the localized names of the accounts AND GROUPS you care about
    - Store these localized names in MSI properties

2) After your custom action has run, you will have defined some properties that 
you can use in your WiX. In our case, it was to control permissions on registry 
keys. In your case, rather than adding the user to the group yourself, you 
might prefer to use the WiX Util extension, which has the User and Group XML 
elements.

Here's a snippet of the VBScript that we use to localise account and group 
names:

---
function TranslateAccountNames()
    Session.Property("ACCT_NETWORK_SERVICE") = sid2user("S-1-5-20")
    Session.Property("GROUP_AUTHENTICATED_USERS") = sid2user("S-1-5-11")
    TranslateAccountNames = vbOk
end function 

function sid2user(sid)
    username = GetObject("winmgmts:").Get("Win32_SID.SID='" & sid & 
"'").AccountName
    sid2user = username
end function
---

I'm not sure if this is the "best" way to achieve this sort of thing, but it 
worked for us!

Mike

-----Original Message-----
From: Lian Jiang [mailto:lji...@microsoft.com] 
Sent: 30 September 2009 21:47
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] how to add language neutral Everyone user to a group

Hi,

My installer adds Everyone user to a group using this VBscript:

        set group=GetObject("WinNT://./remote desktop users")
        group.add "WinNT://everyone"

Unfortunately, it does not work on non-en-us locale machines. I guess 
"Everyone" need to be localized or I should use SID instead of string for 
Everyone.

I tried to add Everyone's SID (S-1-1-0) but it did not work.

What is the best way to make this action language neutral?


Thanks
Lian



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to