You are not logged in.
Pages: 1
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
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
Thank you so much IA-32. It helps me a lot.
Offline
Pages: 1