I need to extract iso file and /or other archieve formats to usb drive. When the extract process exisist the show the user progress of the process. For extraction i use windows version of bsdtar. The only idea i got is to calculate drive and iso size then create progress bar accordingly. But i am finding it difficult to get the progress bar properly. Code is given below.Any help is appriciated.
Note: Please do not suggest me to use 7zip.
Note: Please do not suggest me to use 7zip.
#include <GUIConstants.au3> #include <GUIConstantsEx.au3> _PROGRESS () Func _PROGRESS () $Progress = GUICtrlCreateProgress(8, 56, 417, 25) $Form = GUICreate("Extracting File", 369, 128, 193, 126) GUISetState(@SW_SHOW) $Progress1 = GUICtrlCreateProgress(8, 56, 353, 17) $close = GUICtrlCreateButton("Close", 200, 88, 75, 25, 0) $start = GUICtrlCreateButton("Start", 80, 88, 75, 25, 0) $Dest = "J:\test\" Const $iTotal_Space = Round (DriveSpaceTotal ( "J:" )) Const $FILE_SIZE = FileGetSize ( "E:\archieve.iso") $iIsoSize = Round ($FILE_SIZE / 1048576) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $close ExitLoop Case $msg = $start $Extract = Run(@DesktopDir& '\bsdtar.exe -C J:\empty -xf E:\archieve.iso', "", @SW_HIDE) While ProcessExists($Extract) $iCurrentSize = Round (DriveSpaceFree( "J:" )) $iDummyValue = 15252 - $iCurrentSize $percentage = Round ((($iDummyValue / 280) *100 )) ConsoleWrite ($percentage) If $percentage > 0 And $percentage < 101 Then GUICtrlSetData($Progress1,$percentage) Sleep (3000) EndIf WEnd EndSelect WEnd EndFunc