how to confirm a command ??

M

Marcelo López

I also need to confirm commands. It means that i have a bat that i need to
execute.
The bat performs a cacls command which requires confirmation. How can i say
"yes" in my but to confirm automatically the command ???

Regards

Marcelo López
Infocorp
Latin America
 
O

Oli Restorick [MVP]

Hi there

If you need to send "yes", place "echo yes|" in front of the command. The
spacing is important.

For instance, to send a "y" to cacls.exe to force it to run, use the
following:

echo y|cacls.exe /t /g administrators:F users:R

Hope this helps

Oli
 
A

Al Dunbar [MS-MVP]

Oli Restorick said:
Hi there

If you need to send "yes", place "echo yes|" in front of the command. The
spacing is important.

As is the fact that the double quotes should not be there.

/Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

User Accounts 1
Hide User Account 3
Problem using CACLS 3
How to exeute a BAT ?? 1
How to execute a .BAT ?? 1
How to Execute a File ?? 1
Create Admin Account 1
Folder Permissions 1

Top