Custom Action .EXE or .BAT calls not working - 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!

koorby
Posts: 3
Joined: Tue Feb 24, 2009 8:54 pm

Custom Action .EXE or .BAT calls not working

Please help :)

I am at my wit's and all the installer packages we have been using have failed to help us release our ~4.5GB application on DVD, since most installers top-out at 2GB and don't offer an easy means to do CAB splitting. Along comes Advanced Installer to the rescue! Or so we thought ;)

Only one problem: I just cannot get the custom action to call two vital .EXE and .BAT files correctly at the completion of the installation. They are part of the installation and are executed from [APPDIR]\Base\Scripts folder, but it appears that when they are called it is not from their installed folder, which is where they should be called from. The result is that the batch file is failing because it uses it's base location as the 'root' folder for its operations, and the .EXE is failing because it cannot find its support configuration files.

Without these calls working we cannot release, and I desperately want to purchase your program and release our product.
Attachments
This is the error message I see when the .BAT file is attempted to be executed from its base folder in the destination folder on D: drive. It is as though it does not know where it is installed,
This is the error message I see when the .BAT file is attempted to be executed from its base folder in the destination folder on D: drive. It is as though it does not know where it is installed,
error_message.jpg (46.02 KiB) Viewed 4500 times
koorby
Posts: 3
Joined: Tue Feb 24, 2009 8:54 pm

Re: Custom Action .EXE or .BAT calls not working

I tried to attach our AIP file, but did not see it in the final post. Trying again.
Attachments
setup.zip
Here's a zip of our AIP file
(18.48 KiB) Downloaded 252 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Custom Action .EXE or .BAT calls not working

Hi,

Please note that the paths used in the command line of a custom action should be enclosed by quotes ("). Otherwise the path will not be recognized if it contains blank spaces. For the custom action which runs the BAT please try enclosing the file reference in quotes.

Also, for the EXE you can try using an "EXE with working Dir" custom action. This way you can specify the working directory of the EXE so it can find its configuration file. Let me know if the problem persists after modifying the project.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
koorby
Posts: 3
Joined: Tue Feb 24, 2009 8:54 pm

Re: Custom Action .EXE or .BAT calls not working

Hi Cosmin, thanks so much for the prompt reply :)

Re: the .BAT file here is what I have in the command line:

[RESULT_PROPERTY][Scripts_DIR][#DVD_First_Run_Script.bat]

Where [RESULT_PROPERTY] is the Search result value which is the install location of the target folder which I obtained from the registry. Can you specifically give me an example of how I can explicitly add the path, if the path is variable based upon the intalled location of the user's application (our addon is not the core application, but a 3rd party addon).

For the .EXE call I have now used your suggestion and have this in the Full Path field:

[Scripts_DIR][#FTXConfigurator.exe]

Neither solution has worked unfortunately.

EDIT: I worked around the problem of not running those two apps (user manual intervention), and then compiled the full build. However, at about 45% of the way through making the CABs I aborted the build since the compression was really poor and I had already had about 6GB of CAB files in the work folder. If Advanced Installer does not de-dupe files with the same content and uses poor compression, I'm afraid it's not a solution that will work for us, sorry. Thanks for your assistance anyway.

Here's the error I now get:
Attachments
error2.jpg
error2.jpg (45.17 KiB) Viewed 4484 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Custom Action .EXE or .BAT calls not working

Hi,
Re: the .BAT file here is what I have in the command line:
[RESULT_PROPERTY][Scripts_DIR][#DVD_First_Run_Script.bat]
Please note that the "[#DVD_First_Run_Script.bat]" entry is actually a reference to the BAT file and it will be resolved to the full path of the BAT when the installation runs. Therefore, the command line should use only the file reference. Also, since the reference uses a file in the package, the custom action can run only after "InstallExecuteSequence" -> "InstallFiles" as deferred.

The "[Scripts_DIR]" entry is a reference to a folder in the package and it will be resolved to the full path of the folder during install. For your custom action the correct options would be:

Code: Select all

"[#DVD_First_Run_Script.bat]"
or

Code: Select all

"[Scripts_DIR]DVD_First_Run_Script.bat"
or

Code: Select all

"[RESULT_PROPERTY]Scripts\DVD_First_Run_Script.bat"
However, at about 45% of the way through making the CABs I aborted the build since the compression was really poor and I had already had about 6GB of CAB files in the work folder. If Advanced Installer does not de-dupe files with the same content and uses poor compression, I'm afraid it's not a solution that will work for us, sorry. Thanks for your assistance anyway.
Indeed the CAB compression is not very good. Unfortunately this is a Windows Installer limitation. However, Advanced Installer offers LZMA compression for the installation package. You can enable the LZMA compression in the Media tab of the "Media" page (it can be used only in an Enterprise project).

Regards.
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”