Kamlesh, this is not a direct response to your script, or anything like that.
I have not been paying much attention to this thread lately, so apologies to the OP if I am missing something here. I just think that we are getting silly here re-inventing wheels when there is already a mechanism in place to achieve the stated goal. Instead of doing startup script and net add, why not use the "restricted group"/memberof option?. You can go through the GUI and pick the correct group and you wouldn't have to worry about translations because the name would be in plain sight for you to see. I mean, if you have German clients (which I do here), install the admin tools on a German client, run ADUC and walk through the Restricted Group GUI, se the focus of your search to that German computer, and you will be able to pick administratoren from the list. Then you use that to build your policy. I am probably over-simplifying your needs, but it doesn't seem so to me. Going back to <not paying attention> mode now :) Sincerely, Dèjì Akómöláfé, MCSE+M MCSA+M MCP+I Microsoft MVP - Directory Services www.readymaids.com - we know IT www.akomolafe.com Do you now realize that Today is the Tomorrow you were worried about Yesterday? -anon ________________________________ From: [EMAIL PROTECTED] on behalf of Kamlesh Parmar Sent: Tue 10/11/2005 11:29 AM To: ActiveDir@mail.activedir.org Subject: Re: [ActiveDir] Adding local admin rights to non english native o s? Just thought, if you wanted to remove the dependancy on sid2user.exe... I have created the Vbscript which uses WMI to get the local admin group name from SID... On Error Resume Next strComputer = "." strMember2Add = "Domain\OuAdmins" Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * from Win32_Group Where LocalAccount = TRUE AND SID='S-1-5-32-544'") For Each objItem in colItems StrLocalAdmins = objItem.Name Next strCMD = "cmd.exe /c net localgroup " & strlocalAdmins & " /add """ & strMember2Add & """" iRet = createobject("wscript.shell").run (StrCMD,0,false) On 10/10/05, Kamlesh Parmar <[EMAIL PROTECTED]> wrote: I assume, copying it locally on first run, will make the subsequent run bit faster. Do correct me, if I am mistaken... On 10/10/05, joe < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Can't you run sid2user from the netlogon share? -----Original Message----- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Freddy HARTONO Sent: Monday, October 10, 2005 4:08 AM To: ' ActiveDir@mail.activedir.org <mailto:ActiveDir@mail.activedir.org> ' Subject: RE: [ActiveDir] Adding local admin rights to non english native o s? Thanks for the replies guys Joe, converting the administrator wellknown sid to user seems like a great idea - but then involves copying the .exe into the local machines first and executing it? Havent work out how to do it without copying the sid converter program...if so would have to copy it from the netlogon? For some reason I've done like below but just aint working out :( perhaps some variables like set L is not avail yet on startup? for /F "tokens=2 delims==" %%i IN ('set l') do set gpodcname=%%i if not exist %systemroot%\system32\sid2user.exe copy \\%gpodcname%\netlogon\sid2user.exe %systemroot%\system32\sid2user.exe for /F "tokens=3" %%i IN ('sid2user 5 32 544 ^|qgrep Name') do set gpoadminvar=%%i net localgroup %gpoadminvar% /add "domain\OUAdmins" Thank you and have a splendid day! Kind Regards, Freddy Hartono Group Support Engineer InternationalSOS Pte Ltd mail: [EMAIL PROTECTED] phone: (+65) 6330-9740 - temp -----Original Message----- From: Brian Desmond [mailto:[EMAIL PROTECTED] Sent: Saturday, October 08, 2005 9:17 AM To: ActiveDir@mail.activedir.org Subject: RE: [ActiveDir] Adding local admin rights to non english native os? In 9 years of Spanish, I didn't learn Administrator in Spanish. Thanks, Brian Desmond [EMAIL PROTECTED] c - 312.731.3132 -----Original Message----- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of joe Sent: Friday, October 07, 2005 9:02 PM To: ActiveDir@mail.activedir.org Subject: RE: [ActiveDir] Adding local admin rights to non english native os? Better make that "Powerum Tripum Maximum" or else Laura might get on your about only representing the masculine gender. :o) I knew 3 years of Latin would eventually come in useful. ;o) -----Original Message----- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Darren Mar-Elia Sent: Friday, October 07, 2005 5:54 PM To: ActiveDir@mail.activedir.org Subject: RE: [ActiveDir] Adding local admin rights to non english native os? "Powerus Tripus Maximus" ? -----Original Message----- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Ed Crowley [MVP] Sent: Friday, October 07, 2005 2:03 PM To: ActiveDir@mail.activedir.org Subject: RE: [ActiveDir] Adding local admin rights to non english native os? What is "Administrators" in Latin? Ed Crowley MCSE+Internet MVP Freelance E-Mail Philosopher Protecting the world from PSTs and Bricked Backups!(tm) -----Original Message----- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of [EMAIL PROTECTED] Sent: Friday, October 07, 2005 11:29 AM To: ActiveDir@mail.activedir.org Subject: RE: [ActiveDir] Adding local admin rights to non english native os? This is when your high school language classes come in handy. You will need to know what "administrators" translates to in the target language. For example, in German, it's "administratoren", so your code will look like this: net localgroup administratoren blah blah blah HTH Sincerely, Dèjì Akómöláfé, MCSE+M MCSA+M MCP+I Microsoft MVP - Directory Services www.readymaids.com - we know IT www.akomolafe.com Do you now realize that Today is the Tomorrow you were worried about Yesterday? -anon ________________________________ From: [EMAIL PROTECTED] on behalf of Freddy HARTONO Sent: Fri 10/7/2005 8:51 AM To: 'activedir@mail.activedir.org ' Subject: [ActiveDir] Adding local admin rights to non english native os? Hi all, Usually net localgroup administrators xxx /add would work fine on computer startup gpo - but how about on non english native oses? Would this work as well? Thank you and have a splendid day! Kind Regards, Freddy Hartono Group Support Engineer InternationalSOS Pte Ltd mail: [EMAIL PROTECTED] phone: (+65) 6330-9740 - temp List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Fortune and Love befriend the bold" ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Fortune and Love befriend the bold" ~~~~~~~~~~~~~~~~~~~~~~~~~~~ List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/