jamesstp20 Posted April 26, 2011 Posted April 26, 2011 Hello, I would like to know how to remove or Move a protected file from WindowsDir. Like C:\Windows\System32\hal.dll Thanks you
PsaltyDS Posted April 26, 2011 Posted April 26, 2011 And you would be taking this ill-advised action because...? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
jamesstp20 Posted April 27, 2011 Author Posted April 27, 2011 (edited) I would like to make something just like unlocker. That can remove any file but in autoit Edit: Everything work but I can't remove file from System32 dir because they are protected by "TrustedInstaller" but Unlocker works... How plz ? Edited April 27, 2011 by jamesstp20
JScript Posted April 27, 2011 Posted April 27, 2011 If you change the title would look less "aggressive"... But why remove or move files "TrustedInstaller"?!?!?! http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
wakillon Posted April 27, 2011 Posted April 27, 2011 You need to change advanced security settings and be the owner of locked file ! Example found : #RequireAdmin Local $sFile = 'C:\SomePath\SomeFile.exe' File_Unlock($sFile) Func File_Unlock($sPath) If StringInStr(FileGetAttrib($sPath), 'D') Then Return SetError(-1) If StringInStr($sPath, '/') Then Return SetError(-2) If Not FileExists($sPath) Then Return SetError(-3) Local $exe = @ScriptDir & '\SetACL.exe' If Not FileExists($exe) Then Return SetError(-4) Local $cmd = $exe & ' -on "' & $sPath & '" -ot file' & _ ' -actn clear -clr "dacl,sacl"' & _ ' -actn setprot -op "dacl:np"' & _ ' -actn ace -ace "n:administrators;m:grant;p:full"' RunWait($cmd, @ScriptDir, @SW_HIDE) EndFunc AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
ricky Posted August 18, 2011 Posted August 18, 2011 Hello, it's possible to do the same for a folder? Please see this topic : Thanks for your help
Bert Posted August 18, 2011 Posted August 18, 2011 Just make a small adjustment to the code wakillon provided you. Have you tried to do that? The Vollatran project My blog: http://www.vollysinterestingshit.com/
ricky Posted August 19, 2011 Posted August 19, 2011 Hello, yes, I tried it, but nothing change. I tried the code wakillon, but it doesn't work on Windows 7. Who can help me?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now