China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-07 12:12
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Solved] [NT] Is there a way to make cacls run in quiet mode (automatic response) View 2,257 Replies 17
Original Poster Posted 2006-05-14 17:16 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
: Is there a way to make cacls run in silent mode???

[ Last edited by willsort on 2006-5-15 at 21:58 ]
Floor 2 Posted 2006-05-14 17:23 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
I don't know what you mean by quiet mode. Does it mean no interaction? Or running in the background?
If it means no interaction, try adding the /c parameter. If you want it to run in the background without displaying, you can refer to Regarding the issue of specifying a program to run in the background
Floor 3 Posted 2006-05-14 17:27 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
cacls d: /g everyone:r
Set hard drive permissions, need Y or N
Is there a parameter to make it quiet mode?
Floor 4 Posted 2006-05-14 17:56 ·  中国 上海 长宁区 电信
中级用户
★★
大师兄
Credits 377
Posts 99
Joined 2005-08-26 07:37
20-year member
UID 41945
Status Offline
There is a fun thing called yes, haha, don't blame me for the misoperation oh ; )

for /l %i in (1,1,10) do @copy NUL __%i__.txt
yes | del /p __*__.txt
Attachments
yes.zip (2.81 KiB, Credits to download 1 pts, Downloads: 21)
Floor 5 Posted 2006-05-14 18:00 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Oh, try echo y | cacls d: /g everyone:r.

[ Last edited by 3742668 on 2006-5-14 at 18:40 ]
Floor 6 Posted 2006-05-14 18:10 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
Hehe! Thanks, I'll try it and see!
Floor 7 Posted 2006-05-14 18:43 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
I tried, added the previous parameters, and the subsequent commands didn't work!
Alas!
Floor 8 Posted 2006-05-14 19:33 ·  中国 四川 成都 联通
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Everyone, be serious.

The owner's question has indeed been ignored by many people.

The cacls command is the full name ChangeAccessControlListSettings, which is to change the "security" settings of files (folders) on NTFS. After testing:

echo y | cacls xxxx cannot succeed. The correct method is:

echo y > 1.txt
cacls xxxxxxxxx < 1.txt
del /f /q 1.txt


[ Last edited by electronixtar on 2006-5-14 at 21:37 ]
Floor 9 Posted 2006-05-14 20:10 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
Big shot, it still doesn't work! The permission still can't be changed!
Floor 10 Posted 2006-05-14 20:16 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
For the time being, there is no better method. Just call vbs to sendkeys a "y"

[ Last edited by 3742668 on 2006-5-14 at 20:18 ]
Floor 11 Posted 2006-05-14 20:32 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
Hehe! It seems that full automation can't be done, only semi-automation. Thanks, everyone, guys!
Floor 12 Posted 2006-05-14 20:38 ·  中国 上海 普陀区 电信
中级用户
★★
大师兄
Credits 377
Posts 99
Joined 2005-08-26 07:37
20-year member
UID 41945
Status Offline
My yes program works, you just didn't try it.

This is also okay:
echo y| cacls d: /g everyone:r

Only Microsoft would design such a lousy program.
You type y + space, and it ignores you :)

[ Last edited by tigerpower on 2006-5-14 at 20:45 ]
Floor 13 Posted 2006-05-14 20:39 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
Hehe!! But cacls is generally rarely used!
Floor 14 Posted 2006-05-14 21:35 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
What the 12th floor said is right. I'm convinced, I'm convinced.

Microsoft's stuff is really too... Well, but not ignoring spaces seems to have its reason.

[ Last edited by electronixtar on 2006-5-14 at 21:40 ]
Floor 15 Posted 2006-05-15 17:10 ·  中国 江苏 常州 电信
初级用户
Credits 38
Posts 14
Joined 2006-04-07 11:10
20-year member
UID 53468
Gender Male
Status Offline
Thanks, everyone! The problem has been solved!
Forum Jump: