This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Connect
- :
- FlexNet Connect Forum
- :
- Re: Agent Events not being raised
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2005
02:44 PM
Agent Events not being raised
I'm using the Update Service 4.1 Pro SDK, Visual Basic 6.0 for developement, and InstallShield X for updates. I need updates to take place silently therefore am using AutoUpdate.
I have debug.print statements in all 5 of the Agent Events; however, OnDownloadBegin() and OnProgressChanged() are the only 2 events that ever get raised. There are no errors returned and the update does indeed take place properly. I however need know when the update is downloaded and installed.
I've seen other messages on this forum where people have expierenced the same problem; however, no answers have been given. Is this a known error in the SDK? Are there any work-arounds? I need to resolve this quickly so can anyone recommend where I might get an answer to this issue?
Thanks for your time!
Damon
EDIT: Issue resolution described in message #5 below.
I have debug.print statements in all 5 of the Agent Events; however, OnDownloadBegin() and OnProgressChanged() are the only 2 events that ever get raised. There are no errors returned and the update does indeed take place properly. I however need know when the update is downloaded and installed.
I've seen other messages on this forum where people have expierenced the same problem; however, no answers have been given. Is this a known error in the SDK? Are there any work-arounds? I need to resolve this quickly so can anyone recommend where I might get an answer to this issue?
Thanks for your time!
Damon
EDIT: Issue resolution described in message #5 below.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2005
07:57 PM
I stopped using the OnDownloadComplete as it was sending false indications that downloads were downloaded and available when in fact there were NO updates! I can't trust the events - using VB6 as well.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2005
10:48 PM
What means do you use now, if you don't mind my asking. I was hoping to be able to manage the update process transparently without user intervention. Have you found an alternate way to do something like this?
Thanks!
Damon
Thanks!
Damon
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2005
11:05 PM
Private Sub CheckISUS()
On Error Resume Next
Dim allowAutoUpdate As Boolean
allowAutoUpdate = GetSetting(App.Title, "AutoUpdateEx", "Enabled", True)
If Not allowAutoUpdate Then Exit Sub
Dim updateFile As String
updateFile = App.Path & "\updates\update.exe"
Dim newFile As String
newFile = App.Path & "\updates\LogbookProUpdate.exe"
If Dir(updateFile) <> "" Then Exit Sub
Dim i As Integer
If Len(ProductCode) > 3 Then
Set UpdateAgent = New Agent
If UpdateAgent.IsConnected Then
Set UpdateCollection = UpdateAgent.EnumUpdates(ProductCode)
If Not UpdateCollection Is Nothing Then
For i = 1 To UpdateCollection.Count
Set UpdateInstance = UpdateCollection.Item(i)
If UpdateInstance.IsSoftwareUpdate Then
UpdateInfo.Title = UpdateInstance.QueryValue(Title)
UpdateInfo.DownloadURL = UpdateInstance.QueryValue(DownloadURL)
UpdateInfo.DisplayVersion = UpdateInstance.QueryValue(DisplayVersion)
UpdateInfo.ProductName = UpdateInstance.QueryValue(ProductName)
UpdateInfo.DownloadSize = UpdateInstance.QueryValue(DownloadSize)
UpdateInfo.TargetDir = UpdateInstance.QueryValue(TargetDir)
UpdateInfo.Details = UpdateInstance.QueryValue(Details)
UpdateInfo.Description = UpdateInstance.QueryValue(Description)
UpdateInfo.Category = UpdateInstance.QueryValue(Category)
UpdateInfo.LocalFileName = UpdateInstance.QueryValue(LocalFileName)
' If UpdateInstance.IsNextUse Then
If (UpdateInstance.Download(True) = True) Then
ISUSUpdateReady = True
If Dir(App.Path & "\updates") = "" Then
FileSystem.MkDir App.Path & "\updates"
End If
If Dir(updateFile) <> "" Then
FileSystem.Kill updateFile
End If
If Dir(newFile) <> "" Then
FileSystem.Kill newFile
End If
FileSystem.FileCopy UpdateInfo.LocalFileName, updateFile
FileSystem.Kill UpdateInfo.LocalFileName
Exit For
End If
' End If
End If
Next
End If
End If
End If
End Sub
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2005
11:48 PM
Neal,
I can't thank you enough for assistance here. While attempting to take an approach such as the one you supplied, an obvious mistake I had made surfaced.
I was both creating and then destroying my modular DWUpdateServiceLib.Agent object in my CheckForUpdates() routine. Obviously once the object is destroyed, it'll stop raising events. Ouch, my bad 😮
I'm glad this happened though because you brought my attention to the possible instability of these events. Are you using the 4.1 SDK?
Is anyone else either able or unable to use these Agent Events reliably?
Damon
I can't thank you enough for assistance here. While attempting to take an approach such as the one you supplied, an obvious mistake I had made surfaced.
I was both creating and then destroying my modular DWUpdateServiceLib.Agent object in my CheckForUpdates() routine. Obviously once the object is destroyed, it'll stop raising events. Ouch, my bad 😮
I'm glad this happened though because you brought my attention to the possible instability of these events. Are you using the 4.1 SDK?
Is anyone else either able or unable to use these Agent Events reliably?
Damon
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 27, 2005
12:59 AM
I had the same problem with OnDownloadComplete. The solution I made is checking the "OnProgressChanged" event. When it reaches "100%", I launch manually the OnDownloadComplete event. I found out that the complete event works when You download the first download but the next ones don't get the complete event anymore.
Hope this helps,
Mika
Hope this helps,
Mika