Custom Action Execution path? - Advanced Installer Community

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!

JanJacobs
Posts: 1
Joined: Wed Jul 23, 2008 7:15 pm

Custom Action Execution path?

Hi All,

I am new to Advance Installer and MSI. I have a Install file which has been done with NSIS and is working, but one of my customers only wants MSI files! I It copies the software into the correct directories, but I have problems with the Custom Actions.

I have created a "Custom Action" with the "Source Path" of "APPDIR\erl.exe".
But when this action executes it is from "c:\Windows\system32"
I would expect it to execute from "APPDIR"

erl.exe is the Erlang runtime which is a virutal machine for Erlang (Simular to a java VM).

Any ideas or suggestions?
Thanks
Jan
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: Custom Action Execution path?

Hallo Jan,

the current working directory tends to be C:\windows\system32 or so, yes.

A) In a script you need to retrieve the value of properties like APPDIR via Session.Property("APPDIR").

B) Inside AI you need to refer to properties like "[|APPDIR]", or similar.

From your description it is not clear to me wether you have case A), B) or another case.

Note that APPDIR is only set to the final value that is being used after the CostFinalize sequence, as far as I know. Also see http://www.advancedinstaller.com/forums ... f=2&t=7739 for info on this from Caphyon.


With best regards

Clemens Anhuth
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Custom Action Execution path?

Hi,
I have created a "Custom Action" with the "Source Path" of "APPDIR\erl.exe".
But when this action executes it is from "c:\Windows\system32"
I would expect it to execute from "APPDIR"
Please try using an "EXE with working Dir" custom action. This type of custom action allows you to set the working directory used by the custom action target. Note that the "Command Line" field must be set to the full path of the EXE, for example:

Code: Select all

"[APPDIR]erl.exe"
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”