A few questions

Topics: Updater Application Block
Apr 3, 2005 at 10:06 PM
originally posted by: kentcb


I've pretty much finished incorporating the UAB2 into my application but have a few questions for the experts:

1. How do I get single-file update to work? If I modify the manifest ID and the hash for one file then the UAB proceeds to download all the files in that manifest. Why is that? What is the point of the hash if it is ignored?

2. Is there any way to reset the download timeout? I want the download to continue for as long as something is actually downloading. If I specify Timeout.Infinite, will the UAB throw an exception if no data is coming down?

3. In the DownloadProgress event, I would like to find out the name of the current file being downloaded. Is there an easy way to do this? The manifest contains the names of all the files - not just those being downloaded.

4. While I'm at it, it would be nice to know the size of the file being downloaded. I imagine this would have to be included in the manifest since HTTP does not report this that I know of. Is there an easy / standard way of doing this?

5. After the DownloadStarted event I get a long delay before the DownloadProgress event is fired. Why is this? Surely it's not just the manifest downloading because that is only a couple of KB.

Thanks for any help,
Apr 5, 2005 at 5:09 AM
originally posted by: chester_cyyang

Answer 1, to create a new manifest for it.
Apr 5, 2005 at 6:13 PM
originally posted by: kentcb

Hi Chester,

Sorry, I don't understand your reply. Are you saying that I have to create a separate manifest for each file if I want those files to be indendently updated?

Apr 6, 2005 at 1:31 AM
originally posted by: AnuragRastogi

1 – As you know that update will download all the files specified between <files></files> node. If you want only single file to be downloaded, you have to create the separate manifest for that entry. for more on partial update see the documentation shipped with block(Using Windows Installer Packages for Partial Updates).

2 - Timeout value is decided once after adding the max wait time with Environment.tickcount. Giving the timeout value infinite will throw an exception.

3 - DownloadFile method in ManifestManager class will solve your purpose.

4 - In DownloadFile method in ManifestManager class you can find this by using response.length property.

5- it may be due to the following reason--
after the download start it updates the information of existing stored task in registry using registry manager class.
Apr 6, 2005 at 2:30 AM
originally posted by: kentcb

Thanks Anurag - I'll try out your suggestions.

Apr 6, 2005 at 4:09 AM
originally posted by: Param23

I think yoy can also use "Hashvalidator Processor for the 1 question "
Apr 6, 2005 at 9:40 PM
originally posted by: kentcb

OK, I'm confused. Take a look at this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/uabch3.asp

See the section on "Using File Hash Comparisons for Partial Updates". I am following those instructions but I am not getting the behaviour I want (and that is described in that article).

I'd really rather not have separate manifests if possible. What's the point of having the file hash if it's not used?

Param23, I'm not sure what the hashvalidator processor is. I searched through the doc but couldn't find anything on it. Can you ellaborate?

Apr 6, 2005 at 10:03 PM
originally posted by: Param23

The ValidateHashProcessor implementation of the IActivationProcessor interface compares the hash value of a downloaded file with the hash defined for that file in the manifest to ensure that the correct files have been downloaded. This class contains the following members:

The Init method of this class extracts the source file name from the ActivationProcessorProviderData, which is passed to the method and stores the information in a class variable.

The Execute method retrieves the hash value of the original download files from the manifest. It then compares the hash of the downloaded file with the hash retrieved from the manifest and throws an exception if they do not match.

I have also stuck with the same question.
Even if you have same hash for files at client and server ,the update downloads the files despite of Hashcomparison =true.

I am also somewhat confused by the same..
Hashvalidator only check for the hash in manifest and hash of downloaded files.

I think this will not solve our purpose...hope will find solution soon..