Quantcast
Channel: AutoUpdater.NET : Auto update library for VB.NET and C# Developer
Viewing all 342 articles
Browse latest View live

New Post: Feature Suggestion - Installer Parameters

$
0
0
First off, I love this library! It's fast, and just works without a hitch.

Onto my suggestion. I really feel this library would be even better if you could define parameters within the appcast.xml for the installer that is being downloaded. The primary reason being that logic such as "/SILENT" (E.G. Inno Installers) could be added to the xml. Causing the program to automatically and silently update, leaving the user to only click "Update" before their newly updated program is ready for use.

I successfully implemented this myself a while ago, by creating a new entry in the appcast parser logic like so.

XmlNode appCastInstallParameters = item.SelectSingleNode("parameters");
InstallParameters = appCastInstallParameters != null ? appCastInstallParameters.InnerText : "";

Please do note, that I believe that this should be implemented separate for both 32 and 64 downloads. I.E. InstallParameters64, in case special or tweaked parameters are needed for the 64bit version of the installer.

Anyways, I hope you like this suggestion and I would really love to see it officially patched in. :)

Created Unassigned: DownloadUpdateDialogueLoad() - String.Format Issue and Correction [1768]

$
0
0
In the DownloadDialogueLoad() function, the library uses the following logic:
_tempPath = string.Format(@"{0}{1}", Path.GetTempPath(), GetFileName(_downloadURL));

This creates a problem in that under my environment and using a 64bit application, the _tempPath is created incorrectly, causing it to become something like:

"C:\Users\Username\AppData\Local\Temp\Setup.exe\"; filename*=UTF-8'Setup.exe'

Which fails to download because it is not a valid path.
This was easily corrected just by using __Path.Combine__.

_tempPath = Path.Combine(Path.GetTempPath(), Path.GetFileName(_downloadURL));

Created Unassigned: create .exe in serverweb [1769]

$
0
0
hello comeprogetto very interesting, but what program do you recommend to create the update(.exe)?

Commented Unassigned: "Releae Notes" Typo [1764]

$
0
0
There's a pretty glaring typo in the latest version. I tried to fix the typo myself but I had some issues compiling it. It's a tiny issue but it's annoying me to no end. Hopefully it can be fixed quickly.
Comments: ** Comment from web user: chriskeeble **

The typo is on _UpdateForm.cs_

The text property for label _labelReleaseNotes_ is:

```
Releae Notes:
```

It should be
```
Release Notes:
```

(The various language resource files cause the text of this label to be updated (translated), so the typo may not be visible to international users running in a language other than English.)

Commented Unassigned: "Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'." [1760]

$
0
0
The above exception is happening every time I go to update. I tracked it down to the DownloadUpdateDialog method GetFileName( ) at line 67. I'm not intimately familiar with web requests but for some reason what is being generated by that line is a FileWebRequest rather than an HttpWebRequest, which is causing the exception. A seemingly simple fix but the FileWebResponse class doesn't have a status property which is what is driving the next bit of logic.

After reading up on the exception a bit I'm guessing it's because of my update XML. From what I read there should be an HTTP at the beginning of my URI or it's considered to be a file path.

<item>
<title>New version 1.5.0.0 is available for XXXXXX</title>
<version>1.5.0.0</version>
<url>\\<<ip address>>\WebData\staging\XXXXXX</url>
</item>

If that's not supported, you might just want to reject the XML entirely with a message that explains why it's being rejected.
Comments: ** Comment from web user: kushalcecypo **

Same error suddently after updating to 1.3.1
My uri is; "\\\\192.168.0.56\\Users\\Public\\RaminianUpdates\\Raminian Setup.exe"

my actual path is \\192.168.0.56\users\Public\RaminianUpdates\Raminian Setup.exe
The path and file are valid (they exist).

Error happens in;
DownloadUpdateDialog.cs > GetFileName()
Line: var httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
Error Message:
An unhandled exception of type 'System.InvalidCastException' occurred in AutoUpdater.NET.dll

Additional information: Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'.

Please advise how to fix, thanks.

Commented Unassigned: "Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'." [1760]

$
0
0
The above exception is happening every time I go to update. I tracked it down to the DownloadUpdateDialog method GetFileName( ) at line 67. I'm not intimately familiar with web requests but for some reason what is being generated by that line is a FileWebRequest rather than an HttpWebRequest, which is causing the exception. A seemingly simple fix but the FileWebResponse class doesn't have a status property which is what is driving the next bit of logic.

After reading up on the exception a bit I'm guessing it's because of my update XML. From what I read there should be an HTTP at the beginning of my URI or it's considered to be a file path.

<item>
<title>New version 1.5.0.0 is available for XXXXXX</title>
<version>1.5.0.0</version>
<url>\\<<ip address>>\WebData\staging\XXXXXX</url>
</item>

If that's not supported, you might just want to reject the XML entirely with a message that explains why it's being rejected.
Comments: ** Comment from web user: kushalcecypo **

Sorry to add onto the above, but does this mean that the latest version does NOT support updating from the LAN/file system, and requires an http:// or ftp:// in the update .XML file?

I'm in a country with extremely slow, and expensive internet speeds, and updating via LAN is definitely preferred.

Commented Unassigned: "Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'." [1760]

$
0
0
The above exception is happening every time I go to update. I tracked it down to the DownloadUpdateDialog method GetFileName( ) at line 67. I'm not intimately familiar with web requests but for some reason what is being generated by that line is a FileWebRequest rather than an HttpWebRequest, which is causing the exception. A seemingly simple fix but the FileWebResponse class doesn't have a status property which is what is driving the next bit of logic.

After reading up on the exception a bit I'm guessing it's because of my update XML. From what I read there should be an HTTP at the beginning of my URI or it's considered to be a file path.

<item>
<title>New version 1.5.0.0 is available for XXXXXX</title>
<version>1.5.0.0</version>
<url>\\<<ip address>>\WebData\staging\XXXXXX</url>
</item>

If that's not supported, you might just want to reject the XML entirely with a message that explains why it's being rejected.
Comments: ** Comment from web user: kushalcecypo **

I made the following change in GetFileName() to get it working for my LAN;
At the top of GetFileName(), and attached:

var fileName = string.Empty;

var httpWebRequest = (FileWebRequest)WebRequest.Create(url);
httpWebRequest.CachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
httpWebRequest.Method = "HEAD";
//httpWebRequest.AllowAutoRedirect = false;
var httpWebResponse = (FileWebResponse)httpWebRequest.GetResponse();
//if (httpWebResponse.StatusCode.Equals(HttpStatusCode.Redirect) || httpWebResponse.StatusCode.Equals(HttpStatusCode.Moved) || httpWebResponse.StatusCode.Equals(HttpStatusCode.MovedPermanently))
//{
if (httpWebResponse.Headers["Location"] != null)
{
var location = httpWebResponse.Headers["Location"];
fileName = GetFileName(location);
return fileName;
}
//}

New Comment on "Documentation"

$
0
0
@pitoloko No need for your If conditional. That's the whole reason for the CheckForUpdateEvent. The Updater does it's info gathering, fires the event which you can consume from your code, and it passes back an UpdateInfoEventArgs object that has all the flags you need to do any work you'd like to do. I assume the idea was that simply downloading whatever needed downloading wasn't going to get the job done. So the event is where you do any actual update work that needs to happen. I suggest dropping this in a bootstrapper whose only purpose is to process any update work you need to happen. Database scripts, registry changes, third party library updates, etc. along with your own app's binaries and supporting files.

New Post: Feature Suggestion - Installer Parameters

$
0
0
You are right. I will implement this feature in next release.

New Post: Update of a program with several .dll and directories

$
0
0
How to update a program containing several .dll and subdirectories with different files (.xml, ..)?

In the example xml file contains only one element "url"

Is this possible with a .zip file?

Thank you.

New Post: Update of a program with several .dll and directories

$
0
0
I recommend you use installer like NSIS to create patch for the new version. You can do this using Self extracting archive but intsaller is better. Pack all files into installer and give url of that installer in XML. AutoUpdater.NET will handle the rest.

New Post: Feature Suggestion - Installer Parameters

$
0
0
I have concern about this functionality. Most of the users who will use parameters gonna use it for silent installation but when AutoUpdater.NET finishes downloading update it executes the installer and closes itself. So there is no way for user to see the progress of installation.

New Post: Exception when trying to update.

$
0
0
I have kinda the same issue as stated here: https://autoupdaterdotnet.codeplex.com/discussions/532853


When i hit update i get hit by a System.ComponentModel.Win32Exception (0x80004005) The specified executable is not a valid application for this OS platform.

Though compared to the other discussion, the file i try to download is a simple WPF app with 2 labels and a button, just to test if i could get the updater working before implementing it.

Though sometimes it works and sometimes it doesn't, it's really really wierd..

I'm suspecting something happens in the AutoUpdater.NET that makes my website time out.. because after i get the error i just get "No data recieved" Errorcode: ERR_EMPTY_RESPONSE (chrome) When trying to browse the location in the browser.

Files:
xmlpath: http://publishingtests.frostshock.dk/UpdaterTest/test.xml
htmlpath: http://publishingtests.frostshock.dk/UpdaterTest/changelog.html
program: http://publishingtests.frostshock.dk/UpdaterTest/program2/WpfApplication3.exe
I know the html path is not relevant, but i thought i would link it anyways so it's there :)


It's possible to try it by downloading the first version here: http://publishingtests.frostshock.dk/UpdaterTest/program/WpfApplication3.exe
then trying to update and if it fails, go to http://publishingtests.frostshock.dk/UpdaterTest/program2/WpfApplication3.exe and notice you get an error.

New Post: Exception when trying to update.

$
0
0
Can you try the application from following link? For the issue you mentioned about website timeout in chrome, AutoUpdater.NET can't cause that type of issue. It must be a server side problem. I see that your website is hosted by unoeuro.com. Please contact them and ask them why this is happening.

https://www.dropbox.com/s/4v4vvzth113wtdh/WPFTestApp.zip?dl=0

Commented Unassigned: Could not load file or assembly 'AutoUpdater.NET [1313]

$
0
0
System.IO.FileNotFoundException: Could not load file or assembly 'AutoUpdater.NET, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. File name: 'AutoUpdater.NET, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null'
Comments: ** Comment from web user: ravi15 **

This may help you.

[http://stackoverflow.com/questions/4469929/could-not-load-file-or-assembly-or-one-of-its-dependencies](http://stackoverflow.com/questions/4469929/could-not-load-file-or-assembly-or-one-of-its-dependencies)


Source code checked in, #32362

$
0
0
[1] Issue ID #1728, Added support for ChangeLog and Download URL relative to location of XML file. [2] Issue ID #1760, Fixed issue when using local network path as a Download URL raises an exception. [3] Issue ID #1764, Fixed 'Release Notes:' typo in UpdateForm. [4] Issue ID #1768, Replaced String.Format with Path.Combine to prevent errors related to temporary path.

New Post: Feature Suggestion - Hash XML Arguement

$
0
0
This is an amazing library and is very simple to implement!

I would like to suggest a new argument where the hash of the file to download could be manually embedded into the xml like so.

<hash>2EF7BA3F51791B1BDC996C0C02C3C66FA15FE6CF5E8A9042554F4A196CB96DD9</hash>

In this example my hash is an SHA-256 format.
So the purpose of doing this would be that the file could be verified before actually installing using code something like this. (see link) http://pastebin.com/uPWeTqbw

This would allow for better manual handling and security of the download/update process.
Especially in the way of generic installers that might just be named "Setup.exe" and could even be inadvertently overridden.

For my usage of the library I have a small program that does the following.
Check for update, if there is an update then check if the file exists locally.
If the file exists locally check its hash, if the hash matches install the update silently.
if the file does not exist or the hash does not match, download and verify the file.

Finally I would also suggest that the UpdateInfoEventArgs provide that exact path that the download would be written to, for easier manual download handling.

New Post: Feature Suggestion - Direct Download and Install (Skip Update Form)

$
0
0
This idea is to allow developers to completely skip the Update/Changelog Form in the case of manually handling the update process. Example: http://pastebin.com/hJ2uJMMN

The reasoning behind would be that if an additional (update) form is not desirable, then the file can be downloaded and installed while still giving the user a way to track the progress of their update.

Edited Unassigned: Support for relative URL [1728]

$
0
0
I suggest to enable relative paths for the ChangeLog and Url values - relative to location of versioninfo.xml, thus it works for any server path.
It can be achieved by adding code like this in GetRegistryLocation


ChangeLogURL = appCastChangeLog != null ? appCastChangeLog.InnerText : "";
Uri cl = new Uri(webResponse.ResponseUri, ChangeLogURL);
if (cl.IsAbsoluteUri)
{
ChangeLogURL = cl.AbsoluteUri;
}

XmlNode appCastUrl = item.SelectSingleNode("url");

DownloadURL = appCastUrl != null ? appCastUrl.InnerText : "";
Uri dl = new Uri(webResponse.ResponseUri, DownloadURL);
if (dl.IsAbsoluteUri)
{
DownloadURL = dl.AbsoluteUri;
}

Edited Issue: "Unable to cast object of type 'System.Net.FileWebRequest' to type 'System.Net.HttpWebRequest'." [1760]

$
0
0
The above exception is happening every time I go to update. I tracked it down to the DownloadUpdateDialog method GetFileName( ) at line 67. I'm not intimately familiar with web requests but for some reason what is being generated by that line is a FileWebRequest rather than an HttpWebRequest, which is causing the exception. A seemingly simple fix but the FileWebResponse class doesn't have a status property which is what is driving the next bit of logic.

After reading up on the exception a bit I'm guessing it's because of my update XML. From what I read there should be an HTTP at the beginning of my URI or it's considered to be a file path.

<item>
<title>New version 1.5.0.0 is available for XXXXXX</title>
<version>1.5.0.0</version>
<url>\\<<ip address>>\WebData\staging\XXXXXX</url>
</item>

If that's not supported, you might just want to reject the XML entirely with a message that explains why it's being rejected.
Viewing all 342 articles
Browse latest View live