当我将Windows中的命令输出传递给文件时,它始终由BUILTIN \ Administrators用户拥有。
例如,如果我在Windows命令提示符下运行以下命令:
dir > mydir.txt
然后运行:
dir /q
我得到:1,695 BUILTIN \ Administrators mydir.txt
我可以使用takeown / f mydir.txt为我的帐户授予所有权,但我希望mydir.txt文件在创建时由我的帐户拥有。有没有办法做到这一点?
答案 0 :(得分:0)
A colleague supplied the answer so I thought I'd share. My user ID is part of the Adminitrators group so Windows assigns the BUILTIN\Administrators group as the user in case other Administrators on the computer need access to the file.