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
- :
- Installing a Download without being connected
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
‎Oct 17, 2003
10:53 AM
Installing a Download without being connected
I am writing my software to do a couple of different things. I would like input on how a couple of things work and how to do some things. Here is a general overview of my liveupdate program --
If I have a file already downloaded and ready for install
AskToInstall
else
AskToCheckForUpdates
If we don't check for updates then
Download in the background
endif
endif
The sample code provided to see if an update is already downloaded requires a connection to the internet.
If pagent.IsConnected() Then
UpdateCollection = UpdateAgent.EnumUpdates(GV.GUID)
For iIndex = 1 To UpdateCollection.Count
UpdateInstance = UpdateCollection.Item(iIndex)
If UpdateInstance.Download(True) = True Then
down = True
End If
Next
End If
Can I get around having to connect to see if I already have an update ready to install? I don't see the need for connecting if I have an update already downloaded.
If I have a file already downloaded and ready for install
AskToInstall
else
AskToCheckForUpdates
If we don't check for updates then
Download in the background
endif
endif
The sample code provided to see if an update is already downloaded requires a connection to the internet.
If pagent.IsConnected() Then
UpdateCollection = UpdateAgent.EnumUpdates(GV.GUID)
For iIndex = 1 To UpdateCollection.Count
UpdateInstance = UpdateCollection.Item(iIndex)
If UpdateInstance.Download(True) = True Then
down = True
End If
Next
End If
Can I get around having to connect to see if I already have an update ready to install? I don't see the need for connecting if I have an update already downloaded.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 23, 2003
12:08 PM
The short answer is no. The Agent needs to enumerate the list of updates from the server again.
-----------------
Here is the long version.... When the Agent is called, it needs two pieces of information:
1. all available updates
2. status of each update (not started/ in process/ downloaded)
The list of all updates comes from the server. The knowledge of which ones are in process comes from the Agent using local knowledge. The Agent doesn't expose a way directly enumerate the list of updates that have been downloaded or are in process.
-----------------
Here is the long version.... When the Agent is called, it needs two pieces of information:
1. all available updates
2. status of each update (not started/ in process/ downloaded)
The list of all updates comes from the server. The knowledge of which ones are in process comes from the Agent using local knowledge. The Agent doesn't expose a way directly enumerate the list of updates that have been downloaded or are in process.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 24, 2003
12:48 PM
I have been keeping a log in the application's install folder that is just a text file. It has stored all of the information that QueryValue can give me (all that I find useful anyway) for each update, including LocalDir (the location of the downloaded update). Every time an update is downloaded, I update this log to reflect that an update file currently resides on the local machine, and the log, as I said, also contains all of the other information (LocalDir, CommandLine, Title, Category, Description, etc.) for the update. I can then run the update from a command line when I am not connected. This does not require the use of the agent, and so you do not need to be connected.
My advice, if you really want to do this, is to do something similar to what I just described. Also, an integral part of the log is a flag that indicates whether or not the download completed and whether or not the update has been installed.
My advice, if you really want to do this, is to do something similar to what I just described. Also, an integral part of the log is a flag that indicates whether or not the download completed and whether or not the update has been installed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 25, 2003
04:13 PM
I was wondering how you get all that information you mention. You say something about QueryValue, but I can't find any mention of that call in the documentation.
If you could post some sample code I would greatly appreciate it. I'm using C++, so if you have any C++ code that would be great, otherwise visual basic would be ok too.
Thanks
If you could post some sample code I would greatly appreciate it. I'm using C++, so if you have any C++ code that would be great, otherwise visual basic would be ok too.
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 25, 2003
04:22 PM
All I have now is VB, and I don't have time to transpose, but the VB should give you a good idea of how to do this. Also, you are right, the .queryValue method is not well documented from what I saw. I don't know how I happened to come across it, but here it is!
Note: 'index' is the number of the update in the collection, and the collection can be treated as an array of the update messages that you have posted, including the info messages
Public Sub subDisplayAllUpdateInfo(index)
Dim UpdateAgent As Agent
Dim UpdateCollection As Updates
Dim WithEvents UpdateInstance As Update
Set UpdateInstance = UpdateCollection.Item(index) 'see Note above
MsgBox "Category = " & UpdateInstance.QueryValue(Category) & vbCrLf & _
"CommandLine = " & UpdateInstance.QueryValue(CommandLine) & vbCrLf & _
"Description = " & UpdateInstance.QueryValue(Description) & vbCrLf & _
"Details = " & UpdateInstance.QueryValue(Details) & vbCrLf & _
"DisplayVersion = " & UpdateInstance.QueryValue(DisplayVersion) & vbCrLf & _
"DownloadSize = " & UpdateInstance.QueryValue(DownloadSize) & vbCrLf & _
"DownloadURL = " & UpdateInstance.QueryValue(DownloadUrl) & vbCrLf & _
"Id = " & UpdateInstance.QueryValue(Id) & vbCrLf & _
"LocalFileName = " & UpdateInstance.QueryValue(LocalFileName) & vbCrLf & _
"ProductCode = " & UpdateInstance.QueryValue(ProductCode) & vbCrLf & _
"ProductName = " & UpdateInstance.QueryValue(ProductName) & vbCrLf & _
"TargetDir = " & UpdateInstance.QueryValue(TargetDir) & vbCrLf & _
"Title = " & UpdateInstance.QueryValue(Title), vbOKOnly, "Info"
End Sub
it may be helpful for you to see this in a loop, which would look something like this (this time in c++, though my c++ is rusty):
for (i=0;i subDisplayAllUpdateInfo(i);
}
Note: 'index' is the number of the update in the collection, and the collection can be treated as an array of the update messages that you have posted, including the info messages
Public Sub subDisplayAllUpdateInfo(index)
Dim UpdateAgent As Agent
Dim UpdateCollection As Updates
Dim WithEvents UpdateInstance As Update
Set UpdateInstance = UpdateCollection.Item(index) 'see Note above
MsgBox "Category = " & UpdateInstance.QueryValue(Category) & vbCrLf & _
"CommandLine = " & UpdateInstance.QueryValue(CommandLine) & vbCrLf & _
"Description = " & UpdateInstance.QueryValue(Description) & vbCrLf & _
"Details = " & UpdateInstance.QueryValue(Details) & vbCrLf & _
"DisplayVersion = " & UpdateInstance.QueryValue(DisplayVersion) & vbCrLf & _
"DownloadSize = " & UpdateInstance.QueryValue(DownloadSize) & vbCrLf & _
"DownloadURL = " & UpdateInstance.QueryValue(DownloadUrl) & vbCrLf & _
"Id = " & UpdateInstance.QueryValue(Id) & vbCrLf & _
"LocalFileName = " & UpdateInstance.QueryValue(LocalFileName) & vbCrLf & _
"ProductCode = " & UpdateInstance.QueryValue(ProductCode) & vbCrLf & _
"ProductName = " & UpdateInstance.QueryValue(ProductName) & vbCrLf & _
"TargetDir = " & UpdateInstance.QueryValue(TargetDir) & vbCrLf & _
"Title = " & UpdateInstance.QueryValue(Title), vbOKOnly, "Info"
End Sub
it may be helpful for you to see this in a loop, which would look something like this (this time in c++, though my c++ is rusty):
for (i=0;i
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 25, 2003
04:45 PM
Thank you very much for the help.
Unfortunately I can not get it to work. It appears that the QueryValue function is not available to me. Maybe its because you have a newer version of the agent, mine is 1.21, or maybe that function isn't available in C++, or maybe something else that I can't think of right now.
Thanks for the help though.
Unfortunately I can not get it to work. It appears that the QueryValue function is not available to me. Maybe its because you have a newer version of the agent, mine is 1.21, or maybe that function isn't available in C++, or maybe something else that I can't think of right now.
Thanks for the help though.