AutoUpdater.NET icon indicating copy to clipboard operation
AutoUpdater.NET copied to clipboard

ZipExtractor arguments do not use arguments specified in XML file and instead use arguments from the command line

Open Bongo9911 opened this issue 1 year ago • 4 comments

I'm trying to set custom arguments to be used after the application is updated and restarted using the ZipExtractor. I have set the <args> inside of my XML file, however they appear to be getting overwritten with arguments passed to the command line when the application was ran before the update. It appears that in DownloadUpdateDialog.cs that the installerArgs are being overwritten with the command line arguments even if there are arguments present in the XML file.

I believe there should be a check if there are installerArgs present in the XML file, and if there are it should use those. Otherwise, it should use the arguments from the command line. Does this sound correct?

Bongo9911 avatar Mar 01 '24 19:03 Bongo9911

Are you using a Zip file as an update file or installer?

ravibpatel avatar Mar 04 '24 08:03 ravibpatel

I have a ZIP folder which contains all the application's files and the path to it is set in the <url> portion of the XML file

Bongo9911 avatar Mar 05 '24 20:03 Bongo9911

<args> element is used to provide arguments for installer. Since you are not using the installer, then it will be ignored cause it uses ZipExtractor, which is specifically built to extract zip files.

ravibpatel avatar Mar 07 '24 05:03 ravibpatel

However, the ZipExtractor does restart the application after extracting the files using the arguments that were passed to the application when it was started prior to the update. I'd like a way to override these arguments for when it restarts after updating.

Bongo9911 avatar Mar 07 '24 21:03 Bongo9911