Sign in to follow this  
Followers 0
MadFly1

Replace progress vbs with animated gif

1 post in this topic

Hi

I hope someone would be able to help me here...

I would like to replace the current progress vbs code with a progress.gif image, but I have not the feintest idea how or where to start.

To the best of my knowledge, the gray rectangle is from either one of these subs, right at the very end of the VBScript.

Sub objWIM_Progress(Percent,TimeRemaining)
On Error Resume Next
objShell.Popup Percent, 1, "Title", -1
If Percent = 100 Then
progress.innerHTML = "<table border='0'><tr><td>Percents completed: </td><td>100 % </tr><tr><td>Time remaining: </td><td>0 min 0 sec</td></tr></table>"
Exit Sub
Else
Call ProgressHelper(Percent,TimeRemaining)
End If

End Sub

Sub ProgressHelper(pr,tr)
On Error Resume Next
intFMin = (tr MOD 3600) \ 60
intFSec = (tr MOD 3600) MOD 60
progress.style.visibility = "visible"
progress.innerHTML = "<table border='0'><tr><td>Percents completed: </td><td>" & pr & "%" & "</td></tr><tr><td>Time remaining: </td><td>" & intFMin & " min " & intFSec & " sec</td></tr></table>"
If pr = 100 Then
window.clearInterval(iTimerID)
progress.innerHTML = "<table border='0'><tr><td>Percents completed: </td><td>100 % </tr><tr><td>Time remaining: </td><td>0 min 0 sec</td></tr></table>"
Else
Exit Sub
End If

End Sub

As a way to replace that, I can think maybe change it to show a pop-up HTA similar to the Diskpart/format select screen, but instead the HTA would be fairly simple and have a Style Body object that has this:

background-image:url('resources\imagex.gif')

This is only an example. If you have any questions relating to VBScript, ask them here:

http://www.msfn.org/board/forum/66-programming-c-delphi-vbvbs-cmdbatch-etc/

I tried replaceing that whole code with HTAFile = (SysFolder & "\diskpart.hta") using DISM, but for some reason my boot usb, does not work, any more, and I guess I have to recreate it from start.

0

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.