Scripting Question

icacls /reset - script work but no action on the target

01/08/2016 1277 views
Hi there,

I have some computers which have the folder C:\Windows\Temp with wrong right.
I decided to use my K1000 to reset the rights of the folder "Temp".

I have created a new script which is:

The commande line work fine with an admin console on every computer.

But the script just tell me everything work fine and change nothing.
I tried a "Run As" "local system" account and "administrator account".

Could you guys help me a bit ? 
Thank you and sorry for my bad english ;).
Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author


try to amend the parameters in this way:
/C icacls C:\Windows\Temp /reset /T /C

Actually ICACLS is an executable so you can even try to invoke it directly without the need to use the CMD

Parameters: C:\Windows\Temp /reset /T /C

Kind regards,
 Marco - StockTrader
Answered 01/08/2016 by: StockTrader
Red Belt

All Answers

It work !

Thank you for your help S.
Answered 01/08/2016 by: Olendis
Orange Belt

  • Thanks! may you mark my answer as the ''choosen'' one please?
    In this way the topic will be marked as "Answered"
    Thanks & Regards,
    Marco - StockTrader
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ