I wanted to create my own UI based imaging tool to perform some of the custom tasks I require. To do this I used the command line version of USB Image Tool (usbitcmd.exe). My plan is to use a HTA/VBScript program to launch the command line version and then capture the output to update a progress bar.
Code: Select all
Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec("usbitcmd.exe r 2440 usb.img /i /d") Do While oExec.Status = 0 strTempLine = oExec.stdout.readline if instr(strTempLine, "%") > 0 then intCurrentProg = cint(mid(strTempLine, instr(strTempLine, "%") - 3, 3)) progressBar.Value = intCurrentProg end if Loop
Is there any way I can capture the imaging progress while it is running to show the user how much is left?