This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- InstallScript Custom Action Bug - Tip how to prevent
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Sep 11, 2009
10:49 AM
InstallScript Custom Action Bug - Tip how to prevent
I have a Basic MSI Project with many InstallScript functions being used in Custom Actions.
I have added functions over the years and used them in Custom Actions without any problems until a few years ago.
Then I created a new function and added an InstallScript Custom Action, but I was unable to select the function's name from the drop down list ... it was empty :confused:.
Being under time constraints I resorted to hacking the XML file :cool:.
Now adding a new InstallScript function and Custom Action with IS2010, I had the same problem again.
After diving into this I finally found the cause:
We know that each function requires a the keyword export preceding the prototype.
Most InstallScript keywords are case sensitive, but certain keywords can be case insensitive such as number, string, pointer and export.
For some reason - I seem to remember an InstallShield version in which the editor converted some keywords to uppercase - that export keyword is capatilized for all my prototypes/functions that need exporting.
This is fine with the editor as it highlights the EXPORT keyword and no compilation errors occur.
Converting the export keywords back to lowercase solved my problem: the drop down list is now being populated as expected.
I have added functions over the years and used them in Custom Actions without any problems until a few years ago.
Then I created a new function and added an InstallScript Custom Action, but I was unable to select the function's name from the drop down list ... it was empty :confused:.
Being under time constraints I resorted to hacking the XML file :cool:.
Now adding a new InstallScript function and Custom Action with IS2010, I had the same problem again.
After diving into this I finally found the cause:
We know that each function requires a the keyword export preceding the prototype.
Most InstallScript keywords are case sensitive, but certain keywords can be case insensitive such as number, string, pointer and export.
For some reason - I seem to remember an InstallShield version in which the editor converted some keywords to uppercase - that export keyword is capatilized for all my prototypes/functions that need exporting.
This is fine with the editor as it highlights the EXPORT keyword and no compilation errors occur.
Converting the export keywords back to lowercase solved my problem: the drop down list is now being populated as expected.
//Function Name drop down list will not show this function
EXPORT prototype DetermineWebServers(HWND);
// YES!! function will be present in the drop down list
export prototype DetermineWebServers(HWND);
(3) Replies
‎Sep 11, 2009
08:41 PM
Yes, this was covered several years ago...
http://community.installshield.com/showthread.php?t=156176&highlight=function+list
suprise, suprise, it's still broke...
http://community.installshield.com/showthread.php?t=156176&highlight=function+list
suprise, suprise, it's still broke...
‎Sep 14, 2009
01:50 AM
Well Christopher thanks for pointing at this thread.
The remark by MichaelU in that thread is
At least my functions show again in the drop down list, so I am 🙂
Cheers, Eric-Paul
The remark by MichaelU in that thread is
This one is a bit of a stubbed toe - for the functions to show up in the dropdowns they need to be tagged export. Tagging them EXPORT does not work the same (for the dropdown) and I've heard it has a slightly different internal meaning. Anyway, just make it lower case and it should work a lot better.Curious that there is a slightly different meaning between export and EXPORT and that it has not been solved yet.
At least my functions show again in the drop down list, so I am 🙂
Cheers, Eric-Paul
‎Sep 14, 2009
08:09 AM
Cool. I've been using IS for so many years I pretty much know all the landmines ( bugs ) to step around. Besides, I rarely write InstallScript anymore. I do all of my custom actions in C# using DTF to output Msi Type 1 compatible code.