cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CChong
Level 11 Flexeran
Level 11 Flexeran

background download and b/w throttling

hi all,
I am using the evaluation version of isus. I am having problems in getting background download and b/w throttling to work.
( http://services.installshield.com/helpfiles/Background%20downloading%20and%20bandwidth%20throttling.htm )

Here's what I am trying to do
1. first simulate heavy load on the n/w interface using a script i wrote. The script just copies files over the network in a loop.
2. Then I call the download method of update object with bSilent set to true.

Now I was expecting the b/w utilization for this update to be very low or atleast at such a level that it doesn't slow down my script's transfer rate. but the b/w utilization was really high and it took over a lot of bandwidth from the script. (about half).

Another problem I am having is that no information about the scheduled or partially downloaded updates persists across multiple sessions of ISDM.exe. Although the link above says that even in an event of user logging off, no information is lost.

the code for invoking the agent follows

FORM1:
Private Sub Command3_Click()
Dim pAgent As New DWUpdateServiceLib.Agent
Dim updateCollection As DWUpdateServiceLib.Updates
Dim updateInstance As DWUpdateServiceLib.Update

pAgent.DisplayMessages prodCode.Text

If pAgent.IsConnected() Then
Set updateCollection = pAgent.EnumUpdates(prodCode.Text)

MsgBox updateCollection.Count
For iIndex = 1 To updateCollection.Count
Dim choice As VbMsgBoxResult
Set updateInstance = updateCollection.Item(iIndex)
choice = MsgBox(updateInstance.QueryValue(Title), vbYesNo)
If choice = vbYes Then
[SIZE=3]Form2.download updateInstance[/SIZE]
End If
Next
End If
-------------------------------------------------
code in FORM2

Public WithEvents CurrUpdateInst As DWUpdateServiceLib.Update

Public Sub download(ByRef updateInst As DWUpdateServiceLib.Update)
Set CurrUpdateInst = updateInst
Form2.Visible = True
ProgressBar1.Value = 0
ProgressBar1.Max = CurrUpdateInst.DownloadSize + 1
CurrUpdateInst.download True
End Sub

Private Sub CurrUpdateInst_OnProgressChanged(ByVal nBytes As Long, ByVal nPercent As Long, ByVal strTransferRate As String, ByVal strTimeRemaining As String)

nBytes = Round(nBytes / 1024)
lblStatus.Caption = "Percent complete: " & nPercent & "%" & vbNewLine _
& "Bytes downloaded: " & nBytes & " kb" & vbNewLine _
& "Transfer Rate: " & strTransferRate & vbNewLine _
& "Time left: " & strTimeRemaining
ProgressBar1.Value = nBytes
End Sub
0 Kudos
(1) Reply
Paul_M_
Level 6

I am currently looking into this. I will let you know what results I come up with.
0 Kudos