AquaComm
Posts: 45
Joined: Wed May 06, 2020 3:25 am

Updater | Command Line | Multiple commands

Thu Jul 22, 2021 2:37 am

I am trying to enable and set the logging level on the command line when running the updater as there seems to be no other way of configuring logging.

If I run "/checknow" then it checks but without logging anything. I have tried all ways I can think of to get "/set loglevel Error|Debug /checknow" to work but without luck.

Can someone be kind enough to give me a c# example on how to call the process.

Thanks.

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Updater | Command Line | Multiple commands

Thu Jul 22, 2021 2:25 pm

Hello,

In order to get "/setloglevel Error|Debug /checknow" to work you need to enclose "Error|Debug" in quotes as detailed in our documentation:

Updater

You can combine the following attributes by separating them using the pipe character ("|") and enclosing them using quotes (i.e. "Error|Debug").

You can also use other ways of configuring logging:

- you can create a desktop shortcut that will point to the updater.exe file in the package. Right click on your shortcut from the "Files and Folders" page, select "Properties" and there you can input the arguments to create your log.

- you can also use the command line for updater if you use "Automatic: using WIndows Scheduled Task". Just click on "Configure task" and there you can use your command line. This option is available starting with our Enterprise edition.

As for the C# example, please have a look over the following articles:

- StackOverflow - Running EXE with parameters

- Process.Start Method

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

AquaComm
Posts: 45
Joined: Wed May 06, 2020 3:25 am

Re: Updater | Command Line | Multiple commands

Fri Jul 23, 2021 3:35 am

Thank you for your comprehensive response.

I am afraid I must be doing something else wrong as this is the result I get ...
2021-07-23_11-50-52.gif
2021-07-23_11-50-52.gif (31.61KiB)Viewed 41317 times
This results in a INVALID_COMMAND_LINE (hex: 0xE0000006 / decimal: -536870906) - The command line is not recognized. error.

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Updater | Command Line | Multiple commands

Fri Jul 23, 2021 3:18 pm

Hello,

Indeed, we tested this and the log is not created. You need to pass arguments one by one. Only one command line with "/" is accepted at a time.

Please try to adjust your code like in the screenshot below:
process.png
process.png (11.09KiB)Viewed 41301 times

The log file is named "updater.log" and created in the folder where the updates are downloaded. This means the log file is created when you press "Next" or "Cancel" from the opened "Update" window.

Let us know if that helped. If you have any other questions, please don't hesitate to contact us.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

AquaComm
Posts: 45
Joined: Wed May 06, 2020 3:25 am

Re: Updater | Command Line | Multiple commands

Sat Jul 24, 2021 12:41 am

Dan wrote:
Fri Jul 23, 2021 3:18 pm
Let us know if that helped.
That worked thank you. Please update your documentation as I am a newbie to AI and I spent a considerable amount of time on this.

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Updater | Command Line | Multiple commands

Tue Jul 27, 2021 11:35 am

Hello,

Thank you for your followup on this!

We are glad everything works as expected now!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

koutnypetr
Posts: 10
Joined: Mon Jan 22, 2024 3:27 pm

Re: Updater | Command Line | Multiple commands

Thu Jan 25, 2024 5:18 pm

Only one command line with "/" is accepted at a time.
This is really weird behavior when we need to call the updater couple times instead of once. It is also not obvious why some portion of switches start with slash character and some with dash.

Btw based on this behavior, it seems that Udpater stores the setting somewhere. Where is it please? Because the INI file looks unchanged.

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Updater | Command Line | Multiple commands

Fri Jan 26, 2024 3:53 pm

Hello,

I'm afraid this is the default behavior. You need to pass arguments one by one. Only one command line with / is accepted at a time.

The command line arguments start with a slash "/" and only one command line option can be used at a time.

Command-line switch starts with dash "-" and can be combined with command line options, as per our Updater article. Also, you can use multiple switches in a single command line, for example: updater.exe /silentall -reducedgui -nofreqcheck

The "/set loglevel "Error|Debug"" command can be used once. It is not necessary to call it every time. Once this command is executed for the Updater on a machine, the log file will always be created on this machine when the Updater is launched.

Let us know if you have any other question.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

koutnypetr
Posts: 10
Joined: Mon Jan 22, 2024 3:27 pm

Re: Updater | Command Line | Multiple commands

Mon Jan 29, 2024 9:15 am

Thanks, though I have seen this information in the article :-)

But my question is still valid - since logging is enough to change once, where is the configuration stored?

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Updater | Command Line | Multiple commands

Mon Jan 29, 2024 1:09 pm

Hello,

The log file is named "updater.log" and created in the folder where the updates are downloaded.

Let us know if you have any questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

koutnypetr
Posts: 10
Joined: Mon Jan 22, 2024 3:27 pm

Re: Updater | Command Line | Multiple commands

Mon Jan 29, 2024 2:22 pm

No, I asked where is the configuration of updater in terms of logging stored.

E.g. I call "updater.exe /set loglevel Debug" and it is required to call once so it has to store the configuration somewhere. Where is it?

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Updater | Command Line | Multiple commands

Tue Jan 30, 2024 1:18 pm

Hello,

As I see, my colleague Dan replied to your email on the same question.

For others who may have the same question, the Updater.exe will store its settings in the registries:

Code: Select all

Computer\HKEY_CURRENT_USER\Software\Caphyon\Advanced Updater
Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”