We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

nits038
Posts: 6
Joined: Mon Jun 08, 2015 10:47 am

Invalid command line while using /silent as command-line.

I have been trying to use /silent as a command line in order to make sure the auto-update feature pops up only when an update is available . But I am getting an " Invalid Command Line" as an error .
So Please help me in using these command-line arguments properly. In order to make it more clear Following are the things I have done :
In the installer Project
Product Information->Updater->Updater Execution->Configure Task->Command Line as /silent.

In the Updater Project
Updates->New Update->Update Installer->Command Line as /silent


Please help me I have trying it from days and I couldn't find any good example also related to how to use Command-Line Arguments.

Thanks in advance.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Invalid command line while using /silent as command-line

Hi and welcome to our forums.

The problem appears because the command line written in the Updater project is not correct. That field should contain that command line that will be sent to the upgrade package, not to the updater, however a Windows Installer-based package does not support the "/silent" command line. If you want it to run silently, you need to send the "/qn" command line.

For more details about how to use the command line you can read the Msiexec.exe Command Line article. You can also follow our Deploying updates of your application tutorials in order to get more familiar with the Updater.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nits038
Posts: 6
Joined: Mon Jun 08, 2015 10:47 am

Re: Invalid command line while using /silent as command-line.

First of all , Thanks a lot for reverting back , I totally appreciate that.

Ok, Now I have changed the command-line in updater project as /qf and in installer project command line as updater /silent . But when I install the project the .ini file which gets referred by updater.exe still have Default CommandLine as /checknow.So it didn't worked as it should. SO I manually again changed in .ini file Default CommandLine as updater /silent and then it worked fine. So please let me kow how this issue can be resolved .

And Secondly, Is this so that /silent works only on check frequency in days and not on the settings which we provide by going in Configure Task option?

Thanks in Advance.
nits038
Posts: 6
Joined: Mon Jun 08, 2015 10:47 am

Re: Invalid command line while using /silent as command-line.

Actually, I have tried so many things but not got it correctly. Can you please just give me the command line options for my requirement. To make my requirement more clear -
I just want a scheduled automatic update check which informs the user that an update is available only when an update is available . It should not be so that it also informs the user that Your software is up to date. Please help me .

Thanks in advance.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Invalid command line while using /silent as command-line.

Hi,
Ok, Now I have changed the command-line in updater project as /qf and in installer project command line as updater /silent . But when I install the project the .ini file which gets referred by updater.exe still have Default CommandLine as /checknow.So it didn't worked as it should. SO I manually again changed in .ini file Default CommandLine as updater /silent and then it worked fine. So please let me kow how this issue can be resolved .
I'm not sure why this happens. Are you sure that you replaced the "updater.txt" file from your server after you rebuilt it?
And Secondly, Is this so that /silent works only on check frequency in days and not on the settings which we provide by going in Configure Task option?
Yes, the "/silent" parameters has the frequency set in the "Update check frequency" field from the "Updater" page of your project. It is not related to the "Configure Task" options.
I just want a scheduled automatic update check which informs the user that an update is available only when an update is available . It should not be so that it also informs the user that Your software is up to date.
Indeed, in order to achieve this, you need to use the "/silent" parameter for the updater. So, to achieve this, you can go in the "Updater" page of your project and check the "Use check frequency" option, then set a frequency in the "Update check frequency" field.

You can see the Auto Updater article for more details about the updater command line parameters.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nits038
Posts: 6
Joined: Mon Jun 08, 2015 10:47 am

Re: Invalid command line while using /silent as command-line.

Well, the update is this is still not working though it does not show that - Your software is up to date and the configuration file is showing /silent as commandline parameter but after 1 day(which is the frequency which I used to check update ) it's not showing that an update is available even though I have kept an update on server and updater.txt is also updated. But when I manually checked by double clicking on updater.exe it showed me the update , downloaded it and installed it. So please look into it. I am attaching the projects , please verify it and lemme know if some change is required .
Attachments
updater.aip
(1.98 KiB) Downloaded 554 times
Check.aip
(24.61 KiB) Downloaded 515 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Invalid command line while using /silent as command-line.

Hi,

Please keep in mind that the updater will not check automatically for the updates if you only set the updates frequency value for it. This is what you can read in the Auto Updater page from the user guide:
  • When using the /silent parameter, the Updater will check for updates at its first launch. After that, a check is performed only if the specified check frequency has passed. No matter how many times the Updater is launched in this period, it will simply exit. If the Updater is launched after the check frequency passes, it will check for updates. If it finds any updates it will prompt the user for them, otherwise it will exit.
So, if you want to automatically check for updates every day, you can go in the "Updater" page and select the "Automatic: using a Windows scheduled task" option to create a scheduled task for it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nits038
Posts: 6
Joined: Mon Jun 08, 2015 10:47 am

Re: Invalid command line while using /silent as command-line.

Well , I had tried using that also but that also didn't worked .It's just the project which I had sent you didn't included the feature of "Automatic: using a Windows scheduled task" . Though I am again trying using your suggestion . Please verify it again. Appreciate your help.

Thanks and Regards-
Nitesh
Attachments
updater.aip
(2.01 KiB) Downloaded 678 times
Check.aip
(24.58 KiB) Downloaded 742 times
ini file which got created.png
ini file which got created.png (118.05 KiB) Viewed 8966 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Invalid command line while using /silent as command-line.

Hi Nitesh,

Looking over the scheduled task that you configured, I noticed that you added a wrong command line in the "Task" tab. The "updater.exe" parameter should not be added to the command line because it is already written in th "Run" field. Also, you do not need any command line added to the scheduled task, because the updater will take its command line from the INI file that is created next to it.It is also recommended that you enclose into double quotes the value from the "Run" field.

Furthermore, I noticed that you set the task to be repeated every 3 minutes in the "Repeat" tab of the scheduled task, but this is not necessary as long as the updater can be called only once per day.

By the way, there is an issue in Advanced Installer that prevents a task from running on a Windows 8.1 machine. When a scheduled task is created and it is set to run "Daily" at a specific time, after it is installed, the start date is set to an old date (you can check this in the "Target" tab of the task, in the "Task Scheduler" window). We will try to fix this in the next version of Advanced Installer.

Meanwhile, you can try to create or edit the schedule task using a custom action that launches the Schtasks.exe Windows tool. For more details you can take a look on the Updater mechanisim thread.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nits038
Posts: 6
Joined: Mon Jun 08, 2015 10:47 am

Re: Invalid command line while using /silent as command-line.

Using scheduled tasks seems to be a nice suggestion but I still have to try and test this. Though I was thinking of creating my own service now but if this will work I can save my time a bit.I will get back to you on Monday or Tuesday. Thanks a lot man.

Thanks and Regards-
Nitesh

Return to “Building Installers”