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