Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Replace progress vbs with animated gif

- - - - -

  • Please log in to reply
No replies to this topic

#1
MadFly1

MadFly1
  • Member
  • 7 posts
  • Joined 31-May 13
  • OS:Windows 7 x64
  • Country: Country Flag
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/...s-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.


How to remove advertisement from MSFN



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users