E1M1 Posted December 30, 2009 Share 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 Link to comment Share on other sites More sharing options...
Fire Posted December 30, 2009 Share Posted December 30, 2009 Here is: http://www.autoitscript.com/forum/index.php?showtopic=107377 [size="5"] [/size] Link to comment Share on other sites More sharing options...
James Posted December 30, 2009 Share 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 Link to comment Share on other sites More sharing options...
E1M1 Posted December 30, 2009 Author Share Posted December 30, 2009 thanks edited Link to comment Share on other sites More sharing options...
jvanegmond Posted December 30, 2009 Share 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 Link to comment Share on other sites More sharing options...
James Posted December 30, 2009 Share 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 Link to comment Share on other sites More sharing options...
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