Mike_Rider
Posts: 8
Joined: Fri Jul 17, 2009 8:01 pm

.bat file name doesn't resolve at runtime

Having a strange problem. We have several windows .bat files in the installer, to do specific tasks. When the installer runs, their name doesn't get resolved. Error message is something like "Cannot find c:\Program."

Our app is going into c:\Program Files\etc. One subdirectory has our .bats. Set it up like this:

Custom actions
Clicked custom action wizard
Selected "open another kind of file"
Selected "a file installed by this package"
Navigated to the .bat file, clicked OK
Commit, next, finish

The Custom Action Properties screen appeared.
Source Path: <viewer.exe>
Source Type: Executable (*.exe)
Command Line: [#our_bat.bat]

Selected execution property async, don't wait for return. Execution option commit.

Build went fine. Copied the installer to our test machine, ran it, got the "Cannot find c:\Program" error.

Tried "[#our_bat.bat]", ["#our_bat.bat"], no go. Changed the command line to "C:\Program Files\ ..... \our_bat.bat", that worked. But, if we ever change the installation directory, the hardcoded command line is one more thing to remember. How can AI run .bat files if the path has a space, like Program Files does?
Mike_Rider
Posts: 8
Joined: Fri Jul 17, 2009 8:01 pm

Re: .bat file name doesn't resolve at runtime

This should go in Common Problems, not Feature Requests. Can a mod move it please?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: .bat file name doesn't resolve at runtime

Hello,

Please make sure you used the "Edit" button to select your bat file, and that you enclosed it in quotes. One or more occurences are not enclosed, which is why you encounter this error message.
If you still can not resolve the issue, please send us your .aip project file to support at advancedinstaller dot com.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”