It has been a while last time i was here, nice to see everything is still up and running like it was in the time i joined here.
Anyone can help me out, i like to read DISM StdoutRead and display a custom progress bar using AutoIt
I have found some partial scripts here, but none seems to work with DISM
In the code below the idea was to read out the increasing '=' signs as shown in the pics above
#RequireAdmin Opt("MustDeclareVars", 0) ; Script Start - Add your code below here ; Set the max number of = signs to expect $maxTicks = 52 ;26 = signs both left and right from the percentage indicator ; Run the child process, connecting to its STDOUT pipe $process = Run(@COMSPEC & ' /k dism /mount-wim /wimfile:' & @ScriptDir & '/boot.wim /index:1 /mountDir:C:\Mount', @ScriptDir, @SW_HIDE, 2) ; Show the progress bar ProgressOn("= Count", "Counting...") ; Read from the child's STDOUT While 1 $readTicks = StdoutRead($process) ; if StdoutRead sets @error to -1 we're at EOF, so exit If @error = -1 Then ExitLoop StringReplace($readTicks, "=", "0") ; StringReplace keeps a count of chars it replaces in @extended $totalTicks += @extended ; Adjust the progress bar ProgressSet(($totalTicks / $maxTicks) * 100) WEnd ; Hide the progress bar ProgressOff() MsgBox(0, "Debug", "Done.") ; Finished
Anyone got an idea how to make this work?