Sign in to follow this  
Followers 0
mesale0077

unistall func

8 posts in this topic

#1 ·  Posted (edited)

hi 
;unistall func

Send("!{F4}")

sleep(300)
_unistall()
Func _unistall()
    Local $sCmdFile
    FileDelete(@TempDir & "\delete1.bat")
    $sCmdFile = 'TASKKILL /IM "'& @ScriptName & '"'& @CRLF _
    & 'rd /s /q "' & @WorkingDir& '"'& @CRLF _
     & 'del ' & @TempDir & "\delete1.bat" & @CRLF _
     & 'exit' 
    FileWrite(@TempDir & "\delete1.bat", $sCmdFile)
    Run(@ComSpec & ' /c "' & @TempDir & '\delete1.bat"', "", @SW_HIDE);   <=dont work 
EndFunc
;but delete1.bat file work
;but autoit code" Run(@ComSpec & ' /c "' & @TempDir & '\delete1.bat"', "", @SW_HIDE)" dont work why?
hi

;but delete1.bat file work

;but autoit code" Run(@ComSpec & ' /c "' & @TempDir & '\delete1.bat"', "", @SW_HIDE)" dont work why?

thank you for help me

Edited by mesale0077

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

thank you but ,bat file dont work folder delete ???

delete demoprogram file but dont delete demopro folder

Edited by mesale0077

Share this post


Link to post
Share on other sites

try this

If @Compiled = 1 Then
    Msgbox(0,'',"I'll delete myself."&@CRLF&@AutoItExe)
    $batch_file = @TempDir&'\lol.bat'
    $cmd = _
    'taskkill /PID '&@AutoItPID&@CRLF& _
    'del "'& @AutoItExe &'"'&@CRLF& _
    'del %0'
    FileWrite($batch_file,$cmd)
    ShellExecute($batch_file,'','','',@SW_HIDE)
Else
    MsgBox(0,'','You need to compile this script to see the effect!.')
EndIf

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

ok but

workingdır folder delete "@WorkingDir&" delete ,file delete ok but folder dont delete folder ,ı want folder "@WorkingDir" delete

thank you for help me

Edited by mesale0077

Share this post


Link to post
Share on other sites

To completely remove the folder,

this like it func

DirRemove(@WorkingDir, 1)

ı want with bat file delete (@WorkingDir) folder

but dont work

thank you for help me

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

whatever Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0