进入安静模式命令提示符 [英] To quiet mode command prompt

查看:83
本文介绍了进入安静模式命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行命令语法"cacls d:\ dd/t/g every:r"来访问网络共享文件夹.
但是向我显示了确认消息.

我想这样做,而无需要求确认或安静模式来执行上述命令语法.
我将如何在命令提示符下执行?
请任何人以正确的方式帮助我...

I run to command syntax ''cacls d:\dd /t /g everyone:r'' for access the network share folder.
But confirmation msg shown to me.

I want to do that, without being asked for confirmation or quiet mode to execute above command syntax.
How will i perform in command prompt???
please anybody help me in right way...

推荐答案

首先,CACLS报告自己已弃用,建议使用ICACLS.
请参阅: http://technet.microsoft.com/en-us/library /cc753525%28WS.10%29.aspx [)对其进行模拟.
First of all, CACLS reports itself as deprecated, ICACLS is recommended instead.
Please see: http://technet.microsoft.com/en-us/library/cc753525%28WS.10%29.aspx[^].

If a console application requires a user input, on command line it is simulated using the input pipe "<", such as
someApplication.exe /param1 /param2:value < userinput

在.NET应用程序的代码中,您可以通过使用System.Diagnostics.Process.Start重定向输入流System.Diagnostics.Process.StandardInput来实现.您还可以重定向StandardOutputStandardError字符串.

请查看带有输入重定向的示例代码:
http://msdn.microsoft.com /en-us/library/system.diagnostics.process.standardinput.aspx [ http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject. aspx [^ ].

—SA

In the code of you .NET application, you can do it by redirecting of the input stream System.Diagnostics.Process.StandardInput using System.Diagnostics.Process.Start. You can also redirect StandardOutput and StandardError strings.

Please see the sample code with input redirection: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardinput.aspx[^].

See also http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject.aspx[^].

—SA


这很容易找到.您所要做的就是打开CMD提示符并键入CACLS /?.

没有任何提及类似于Quiet开关或抑制提示的内容,所以没有,没有办法做到这一点.

另一方面,ICACLS确实支持它.我会把它留给您作为练习,以了解它是什么.
This would have been easy to find. All you had to do was open a CMD prompt and type CACLS /?.

There isn''t any mention of anything resembling a Quiet switch or anything to suppress prompts, so no, there''s no way to do that.

ICACLS on the other hand, does support it. I''ll leave that as an excersize to you to find out what it is.


这篇关于进入安静模式命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆