Edward-Ross
Posts: 26
Joined: Tue Jun 08, 2004 9:38 am
Contact: Website

Arguments to Launch Application

AI has the ability to launch a program after install. The configuration of which is editable from the 'Installation Complete' dialog settings.

However, I want to launch a script using an interpreter, which I can't do. Would it be possible to either:

a. Allow the addition of arguments to the launch command
or
b. Allow the launch command to point to a shortcut in the program menu

Thanks,

Ed.
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

How about creating a .bat script that launches the script you want with arguments?

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Edward-Ross
Posts: 26
Joined: Tue Jun 08, 2004 9:38 am
Contact: Website

I just gave this a try. I made a batchfile with relative paths:

start ..\..\tcl\bin\wish.exe exministrator.tcl
exit

It works if I click on the batch file. But when launched by the installer it says it can't find wish.exe.
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Hmm, you are right, actually. If you CA was an EXE though, you could call :GetModuleFileName() to find out where it is located and base your path from there.

Otherwise, the working directory for Custom Action cannot be controlled. I'll add this to our todo list.

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Edward-Ross
Posts: 26
Joined: Tue Jun 08, 2004 9:38 am
Contact: Website

Setting the working directory to the directory where the launched .bat or .exe would probably be good in most cases.

It would be really nice to have an entry box to add the command line args. Then I could just link to the installed wish exe and specify the script with a relative path in the args (assuming the CA was running in its own dir). Would that be difficult to implement?
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Well, that's the problem: currently all CAs are run in directories we can't specify (it's the WI way).

We'll have to dig and find a solution. For now, an exe CA is the only work around.
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Edward-Ross
Posts: 26
Joined: Tue Jun 08, 2004 9:38 am
Contact: Website

Any news on whether its possible to specify args to the post install launch application?
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

No progress yet on this one, sorry... :(

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Edward-Ross
Posts: 26
Joined: Tue Jun 08, 2004 9:38 am
Contact: Website

Now that custom actions can have a working directory - is it possible to add a directory to the launch application at start?
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Yes! Just create a Custom Action of type "EXE with Working Dir".

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Guest

But, can I associate that action with the 'launch on completion' check box, in the finished dialog?
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

No... but we could make the "launch on completion" action to change the current directory to that of the file being launched. We could do that for the next version (2.3) due for release next week.

Would that solve the issue?

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Guest

That would be great! Then i can launch use the batch file solution to do what I want.

Thanks,

Ed.

Return to “Feature Requests”