E1M1 Posted December 30, 2009 Posted December 30, 2009 How to make script that unpacks rar file? I searched from example scripts and found 7zip udf that works nice but it didn't work with rar files, can you recommend me something? edited
Fire Posted December 30, 2009 Posted December 30, 2009 Here is: http://www.autoitscript.com/forum/index.php?showtopic=107377 [size="5"] [/size]
James Posted December 30, 2009 Posted December 30, 2009 (edited) How to make script that unpacks rar file? I searched from example scripts and found 7zip udf that works nice but it didn't work with rar files, can you recommend me something? Download unrar.exe into your script directory. Add this function to your code: Func _Extract($sArchive, $sLocation) $myExtract = Run(@ScriptDir & "\UnRAR.exe x " & $sArchive & " " & $sLocation, @ScriptDir, @SW_HIDE, 0x2) While 1 $extLine = StdoutRead($myExtract) If @error Then ExitLoop EndIf WEnd EndFunc Also, this function is written by me, for AutoAV (making it easier to search for now ) Edited December 30, 2009 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
jvanegmond Posted December 30, 2009 Posted December 30, 2009 Add this function to your code: Func _Extract($sArchive, $sLocation) $myExtract = Run(@ScriptDir & "\UnRAR.exe x " & $sArchive & " " & $sLocation, @ScriptDir, @SW_HIDE, 0x2) While 1 $extLine = StdoutRead($myExtract) If @error Then ExitLoop EndIf WEnd EndFunc Also, this function is written by me, for AutoAV (making it easier to search for now ) James, I find it a little bit weird that you are getting data from the out stream, instead of just using RunWait or checking if the process still exists.. And also omglul you shard sum code from autoav github.com/jvanegmond
James Posted December 30, 2009 Posted December 30, 2009 James, I find it a little bit weird that you are getting data from the out stream, instead of just using RunWait or checking if the process still exists.. And alsoomglul you shard sum code from autoavThe reason it was coming out of the stream was so that I could check everything was going through, I never did get round to changing that.Sharing code? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
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