deb
Posts: 9
Joined: Fri Jan 06, 2006 8:07 am

Qstion on "EXE with working directory" and EXE fro

Hi

I got two questions.

A) How can I pass command line arguements to an exe using the "Exe with working directory .." custom action ? Seems there is no place to specify !

B)

I know how to call a exe file from whithin a vbs file. But if the exe file needs other files to be in the same directory as the exe file - the exe is failing. This is what I have done

1) Used the temp directory in Files and Folder to add a vbs file, an exe file and few other ini/dll files. ( I used the temp directory as I do not want the APPDIR to have these files and I will delete them later at the end of installation)

2) In the install phase ( as deffered action) added a custom action to run the vbs file - which in turn runs the exe file using Return = WSHShell.Run("custominstall.exe",,true). This is because I will need to trap the return code and change the value of a session property. The exe file needs to find those ini and dll files to be in the same working directory.

Now I tried all the options - EXE with working directory , Attached Custom action , Installed Custom action etc - even by setting the current directory to the temp directory before the calling the .Run - but the exe just does not understand the working directory.

This problem vanishes if I run only the exe, as an Exe with working directory custom action. But in that case I cannot change the Session Property detecting the return code.

If there any way out from this ? Any directory issues ?

Thanks in advance
Regards
Deb
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

A) You can not pass command line arguments using the "Exe with working directory" Custom Action. However, the "Property Source" Custom Action supports command line arguments. This requires setting a property containing the EXE path beforehand.

B) In order for the EXE program to find the files it needs, you have to set the current directory in your script, prior to executing the program.

Please see the following thread which discusses this aspect:
http://www.advancedinstaller.com/forums ... .php?t=916


Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”