Hi Leo,
Need some assistance on UAC. We have an expression in french which say: I am a bit "rusty" about the subject. Meaning I may have forgot something about it. Perhaps you have the same in English.
Anyway here the situation.
Following good advise from you and Jon, I started to use "privilege" for some hidden folder to avoid they get deleted even if they are hidden.
So, basically, I am using this command from window to deny access to EVERYONE to some critical folder.
ICacls "D:\Pending Transaction folder" /deny *S-1-1-0:(OI)(CI)W /T /C /Q
This prevent access to everyone to that folder.
Now I have created a Button on my toolbar to remove the privilege from this folder so I can access it as an administrator. I am in ADMIN mode with this computer.
Now when I run this command from a USER-DEFINED-COMMAND called Lock OFF:
Icacls "D:\Pending Transaction folder" /remove:d *S-1-1-0 /T /C
I always get an Admin UAC prompt window.
But if I run it directly from the Button, I don't get any UAC PROMPT WINDOW.
I have created a User-defined-command as it was easy for me to create a few Button calling different locked folder and simply calling from those button LOCK OFF instead of having to write this code above in each button.
So my question is : Why I get a UAC PROMPT WINDOW if this sequence of code above ( The one with /remove) is called from a User-defined command and why I don't get UAC PROMPT window if the command is run inside the Button as itself without a call to LOCK OFF. In both case OPUS run with no elevated privilege. I find it annoying to get this UAC PROMPT WINDOW unless I turn off UAC or move the code line inside of any Button needing it. Advise on that?