Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoUpdater.NET copys files into wrong directory #352

Closed
DavidWeider opened this issue Feb 1, 2020 · 5 comments
Closed

AutoUpdater.NET copys files into wrong directory #352

DavidWeider opened this issue Feb 1, 2020 · 5 comments

Comments

@DavidWeider
Copy link

Hi!
The tool works but it copies the downloaded files into a subfolder of the installation path.

I has set the DownloadPath to Environment.CurrentDirectory --> NOK
After that i has set the DownloadPath as below.
But both solutions doesn't work.

AutoUpdater.ReportErrors = true;
AutoUpdater.RunUpdateAsAdmin = true;
var tt = Environment.CurrentDirectory;
var ttt = tt.Substring(0, tt.LastIndexOf("\\"));
AutoUpdater.DownloadPath = ttt;
AutoUpdater.Start(@"E:\GIT\MyTestApp\UpdateFile\updateFile.xml");

After i clicked "Update", the tool download the zip, extract this and copied the files to:

C:\Program Files (x86)\HP Inc\Setup\Release
--> Setup = Directory where the app istalled.
--> Release = Directory after update, with the updated files.

@ravibpatel
Copy link
Owner

Does your executable reside in the Release folder? It usually extracts the content into the folder where your executable resides.

@DavidWeider
Copy link
Author

DavidWeider commented Feb 1, 2020

Yes it does.
In this testproject i have zipped the release directory. This is in the xml linked.

<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.37.0</version>
<url>E:\GIT\MyTestApp\bin\Release.zip</url>
<mandatory>false</mandatory>
</item>

How does the updater work after download the zip?

@ravibpatel
Copy link
Owner

ravibpatel commented Feb 1, 2020

It extracts the zip file in a folder where your executable resides. You can see it here. args[2] here contains your executable path.

@DavidWeider
Copy link
Author

OK!
That works. In this directory are the new files. But they aren't copied to the install folder...
(I run the app as admin)
i get no errors after update...

@ravibpatel
Copy link
Owner

Please download the latest lib from here. I added the option to specify the installation path as shown here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants