BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

"invalid msi identifier string" error, if space in

Hi,

I have two questions.

Question #1, I want to run a bat file which is part of the install. I have created a custom action. The custom action is attached/fired on the “Finish” button of the ExitDialog. This seems to work fine, except in the case where the bat file name contains a space.

The bat file name is "Configure RapidServers.bat", when I edit the command line to create the custom action, the file name is changed to [#Configure_RapidServers.bat], note the “_” between Configure and RapidServers. The bat file is not fired because the names do not match.

I have tried to change the command line to "[#Configure RapidServers.bat]" – use a space and put quotes around everything. I then get "invalid msi identifier string" error when I try to save the project.

Question #2 The Source Type for the above action is Executable(*.exe) which seems to work, but the file is a bat file not an exe file. What should the source type be?

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

Hi,

Please note that BAT files cannot be launched with a "New Attached Custom Action" or a "New Installed Custom Action". The only way to launch it is through a "Launch file or open URL" custom action.

In this case, the BAT file should be included in the package and the "Command Line" field of the custom action will be:

Code: Select all

"[#Configure_RapidServers.bat]"
The bat file name is "Configure RapidServers.bat", when I edit the command line to create the custom action, the file name is changed to [#Configure_RapidServers.bat], note the “_” between Configure and RapidServers. The bat file is not fired because the names do not match.
Note that this is the normal behavior of Advanced Installer. Also, the "_"character is used by Advanced Installer in the names of the files instead of a blank space.
I have tried to change the command line to "[#Configure RapidServers.bat]" – use a space and put quotes around everything. I then get "invalid msi identifier string" error when I try to save the project.

Note that this is a reference to the file and it is created automatically. If you modify it then it will no longer be a reference to the BAT file and it will point to nothing.
Question #2 The Source Type for the above action is Executable(*.exe) which seems to work, but the file is a bat file not an exe file. What should the source type be?
For a "Launch file or open URL" custom action the source type must be set to EXE, for the other types of custom actions the BAT extension is not supported.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Thanks for the quick reply with helpful information.

I changed to "Launch file or open URL" and it works fine. The bat file with the space in the name is run. Also it corrects another problem I noticed later, the bat file is run in the directory where it is installed, as I expect.

Thanks Cosmin
Bob

Return to “Common Problems”