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!

roan98dk
Posts: 2
Joined: Fri Mar 29, 2013 9:24 pm

Ignore command line arguments?

I recently switched from InstallShield to Advanced Installer Professional and am trying to distribute a major upgrade to my customers. Unfortunately the way they currently receive the update is through an in-app custom update method that download the new installation and runs a command line upgrade. I used to always distribute upgrades as a SingeImage (executable) that is then executed after download with the command line argument "/s /v/qb+", e.g. "setup.exe /s /v/qb+".

My problem is that when I distribute the "Single EXE setup" generated with Advanced Installer, my current installations will attempt to run the setup using above-mentioned command line argument. The command line fails with an error message "Invalid command line". The same thing of course happens if I manually run the same command in a command prompt. This is of course because the command line arguments "/s" and "/v" are proprietary arguments for the InstallShield EXE bootstrapper.

My question therefore is whether it is possible to create an installation that will ignore any command line arguments specified?

After all my problem is that I cannot remove/modify above-mentioned command line argument until the customers install the new upgrade (where the command line is no longer hard-coded). I also can't distribute an msi upgrade or similar, since the upgrade method expects an executable file with a specific file name.

Perhaps my only choice is to create a wrapper around the setup.exe file, but I would prefer if there is better/easier solution.

Any suggestions or alternate solutions are greatly appriciated.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Ignore command line arguments?

Hello and welcome to Advanced Installer forums,

Please keep in mind that this is not a correct approach. Looking to implement a functionality within the installer to ignore any command line option passed to itself is an overhand solution and a hack approach. Moreover I am unaware of a generic reason for the bootstrapper to have the predefined possibility of "ignore any command line options". You either run it with a command line or you don't.

Since the command line which runs the installer is created by your own updating method, you should fix that method. Another approach would be to completely change the updating strategy by using our own Advanced Updater.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
roan98dk
Posts: 2
Joined: Fri Mar 29, 2013 9:24 pm

Re: Ignore command line arguments?

mihai.petcu wrote: Please keep in mind that this is not a correct approach. Looking to implement a functionality within the installer to ignore any command line option passed to itself is an overhand solution and a hack approach. Moreover I am unaware of a generic reason for the bootstrapper to have the predefined possibility of "ignore any command line options". You either run it with a command line or you don't.
In a way I agree with you and in a way I do not. I believe that you could argue that the natural approach for a specified invalid command line could be to either fail due to invalid arguments or to attempt to continue as if no arguments were specified. Of course the last method would only make sense if it is even possible to run with no arguments. I cannot be the only one having ever had this problem and since this could potentially cause problem while trying to convert customers from a competitive installer, wouldn't it make a lot of sense to offer to either ignore incompatible arguments or simply try to parse command line arguments the "InstallShield-way". The last suggestion especially makes sense because tool to generate Advanced Installer also offers to convert an installation from InstallShield-format. On the other hand I would personally prefer to simply run the installation without the arguments and display a warning saying the the installer is being run in interactive mode due to invalid command line arguments.
mihai.petcu wrote: Since the command line which runs the installer is created by your own updating method, you should fix that method. Another approach would be to completely change the updating strategy by using our own Advanced Updater.
The problem with this suggestion is that I cannot fix the update method before I successfully distribute this new update (in which I have changed the update method). Basically we are talking about a one-time upgrade that will fix these issues, but to tell hundreds or thousands of users to manually run an update in order to fix an issue, is just not an option. Most likely I will be struggling with old installations for years to come in such case. Of course if we have no other options I will have to accept this and apologize to our customers, but I really hope that can be avoided.

Unfortunately I am unable to distribute an update with InstallShield that could change the update method prior to switching to Advanced Installer. This has to do with the fact that the switch to Advanced Installer was not planned and InstallShield no longer works in our environment (for unknown reasons).
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Ignore command line arguments?

Hello,

I'm afraid that we don't have support for this. As you mentioned, in order to achieve what you want, you can try to develop a setup.exe file which will parse the above command line and will launch the installation package (built using Advanced Installer) using a corresponding command line.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”