mjvitale
Posts: 20
Joined: Tue Apr 05, 2005 7:58 pm
Location: Falls Church, VA

How to launch program with command line arguments

In the installation complete dialog, I want to launch my program with some command line arguments, but it won't let me. Is there a workaround for this?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

To launch the application with command line parameters you can create a LNK (shortcut) file to your EXE and include it in your package.
Advanced Installer allows you to create LNK files, but doesn't let you launch them in the "Installation Complete" dialog, so you will have to create one yourself prior to building your package.

The command line for your LNK file should be something like:

MyApplication.exe param1 param2

This LNK file must be installed in the same folder as your EXE file.

All the best,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
mjvitale
Posts: 20
Joined: Tue Apr 05, 2005 7:58 pm
Location: Falls Church, VA

Let me be more precise about these command line parms...

I want to use specific command line parms ONLY ONCE during installation, not afterwards when the user wants to start the program to use it. So won't the LNK solution be invalid then, since I only want to use these specific parms when starting up the program right after installation?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

My suggestion was to have a special LNK file created only for launching
the application the first time. You can name this whatever you want,
say, "firstlaunch.lnk".

For the following launches you can create an usual LNK using the "New
Shortcut" feature from Advanced Installer, which will refer to your
application with no command line parameters. This will be named
"MyApplication.lnk" and will be placed where the user can see it (on the
Desktop, Program Menu Folder, etc.).

Note:
Because paths with spaces may cause problems, in the path of the
"firstlaunch.lnk" you should have something like this:
"MyApplication.exe" 'parameters'.

All the best,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”