1.

Solve : how to catch return code/message of Cacls command?

Answer»

Does anyone know if Cacls.exe returns any code or any message? I have a system command like: system(cacls.exe ....), sometimes the command fails, I need to, instead of USE "system(...)" which does not catch any error code or message, output the error code and message and at the same TIME notify people that this permission command fails. Your help will be greatly appreciated!I GET %errorlevel% 0 if the command works. And I get %errorlevel% 0 if the command fails cause it can't find the folder.
What message do you get? (The exact output TEXT.)
The workaround for this problem could be to find / not find a search item with a for /f STATEMENT and use this %errorlevel%.
Please let us know how it goes.

hope this helps
uli



Discussion

No Comment Found