Evaluated admin Privileges

trying to delete a file in windows/system32 and replace it with another using delete and copy but no luck. it seems when i try to use windows command like icalc and takeown it need evaluated admin privileges.

Can someone help me with this i just want to delete a file in systems32\drivers and replace it. i can achieve this already with power-shell but i prefer to get it to work in big fix.

Thanks

Have a look at the override functionaity - there is a flag you can specify “asadmin=true” which should take care of the safeguard restrictions.

Hi there, i did come around it but i need to it requires username and password for the account. which is a no no is this environment.

Hi, you do not need to use “all flags” that the article uses, just the one that pertain to you - if you don’t want to specify account, just don’t. Try something like this:

override wait
asadmin=true
completion=job
wait cmd /c del “path2” /F
wait cmd /c copy “path1” “path2” /Y

1 Like

Can you post the Actionscript you’re actually trying to use?
The BESClient runs as LocalSystem and the commands are elevated by default, so it should work as long as you don’t have an explicit ‘Deny’ ACL on the file affecting the LocalSystem account.

What I think is more likely is 32-bit redirection. By default the BESClient process runs in 32-bit mode, so you’ll need ‘action uses wow64 redirection false’ in the ActionScript to run in 64-bit mode; otherwise you’ve actually be affecting \windows\syswow64 instead of the intended \windows\system32 folder.

2 Likes

that worked. thanks a bunch. i have been trying to fix this for days. you are the best

Helpful but its not the solution.

Hi @ria01,

Use the following command at the top of the script it might help we did the same process with success
action uses wow64 redirection false