AquaComm
Posts: 16
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: 4358
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: 16
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.61 KiB) Viewed 5019 times
This results in a INVALID_COMMAND_LINE (hex: 0xE0000006 / decimal: -536870906) - The command line is not recognized. error.

Dan
Posts: 4489
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.09 KiB) Viewed 5003 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: 16
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: 4358
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

Return to “Common Problems”