#1 22 May 2012 20:22

budhax
Member
Registered: 04 Dec 2007
Posts: 45

How to detect the MSDOS language?

Hello,

I wrote this script to take ownership recursively of the folder dropped on the script.
http://www.tipandtrick.net/2008/how-to- … -in-vista/

takeown /f "%~1" /r /d y               
icacls "%~1" /grant administrators:f /t

The command on the 1st line (takeown) doesn't work if I use this script on a French Windows.
Because the parameter "y" (for YES) is not accepted for French Windows.
For French Windows I have to use "o" (for OUI in French).
Ridiculous.

1. Why for this command, the parameter depends of the MSDOS language?
2. Is the a way (MS DOS script) to take ownership, independently of the MSDOS language?
3. How to get the MS DOS language?

Thanks and regards.

Offline

#2 23 May 2012 01:57

RG
Member
From: Minnesota
Registered: 18 Feb 2010
Posts: 348

Re: How to detect the MSDOS language?

Would something like this help?

takeown /f "%~1" /r /d y 2>nul
if errorlevel 1 takeown /f "%~1" /r /d o      
icacls "%~1" /grant administrators:f /t

Last edited by RG (23 May 2012 03:21)


Windows Shell Scripting and InstallShield

Offline

#3 23 May 2012 13:10

budhax
Member
Registered: 04 Dec 2007
Posts: 45

Re: How to detect the MSDOS language?

Thank you so much IA-32. It helps me a lot.

Offline

Board footer

Powered by FluxBB