2

Bottom Line

I have inherited a sizeable InstallShield InstallScript installer, and in working through its InstallScript (*.rul) source files, I notice that variable and parameter data types' casing varies - for what appear to be the same data types. For example, I see variables and parameters of type number and NUMBER, string and STRING etcetera.

Changing between uppercase and lowercase in my experiments has not seemed to make a difference; the installer project compiles either way; but I am not sure whether there may be more to the story.

Does InstallScript data-type casing matter? If it does, when and how does it matter?

Further Context

Coming from .NET, C#, and C++/CLI, I understand that long and Int64 are comparable in C#, whereas long and Int32 are comparable in C++/CLI; but the latter in each pair is different even if only to the extent that it necessitates a using directive for the System namespace. I would like to similarly grok types in InstallScript.

Community
  • 1
  • 1
J0e3gan
  • 8,740
  • 10
  • 53
  • 80
  • 1
    Is this a Basic MSI or an Installscript MSI? The latter project type is deprecated and features nasty bugs to deal with. As a sample, here is the one that made it necessary for me to recreate the whole project as Basic MSI: http://flexerasoftware.force.com/articles/en_US/ISSUE/Q212503 – Stein Åsmul Apr 22 '14 at 00:05
  • It is a plain InstallScript project. Wow - that is quite a bug. My guess is that it would affect an InstallScript project like it affects an InstallScript MSI project since loggable system changes via InstallScript before `OnMove` is the root of the problem. Thanks for the heads up. – J0e3gan Apr 22 '14 at 19:47
  • As far as I know plain Installscript projects are OK, but Installscript MSI is a total disaster. That bug is not the only serious one in this project type, and I would recommend a total rewrite in Basic MSI for anyone touching an existing Installscript MSI (Basic MSI projects with Installscript custom actions are OK). Many driver setups are Installscript MSI because they want fancy dialogs. – Stein Åsmul Apr 22 '14 at 20:53
  • InstallShield is definitely the worst software I've ever worked with. It's unreal. It's like they've decided one day to be world champion in bad software. And they are way ahead. Gold medal. – Lieven Cardoen Apr 29 '22 at 13:11

2 Answers2

2

The answers are sometimes and it depends.

The InstallScript Language Reference's Data Types and Predefined Structures section outlines the rules for data-type casing and indicates "that some data types can be entered in either lowercase or uppercase letters".

According to the Language Reference, over 2/3 (13 of 18) of the InstallScript data types are case-insensitive to the extent that they can be uppercase or lowercase.

Interestingly these types cannot be mixed-case (i.e. a combination of uppercase and lowercase). For example, String (versus STRING or string) yields the following compile-time error:

Description                                     Error Code
----------------------------------------        ----------
'String': expected typedef (struct) name        C8017

Also according to the Language Reference, here are the case-sensitive (just under 1/3 (5 of 18)) data types that can only be uppercase:

  • BOOL
  • HWND
  • LIST
  • LPSTR
  • LPWSTR

Entering these data types in lowercase yields compile-time errors like the following:

Description                                     Error Code
----------------------------------------        ----------
'bool': expected typedef (struct) name          C8017

Beyond this, whether to use uppercase or lowercase where permitted is a matter of preference.

J0e3gan
  • 8,740
  • 10
  • 53
  • 80
  • InstallShield is definitely the worst software I've ever worked with. It's unreal. It's like they've decided one day to be world champion in bad software. And they are way ahead. Gold medal. – Lieven Cardoen Apr 29 '22 at 13:11
0

Let me just add this as a separate answer to list some good information sources.

Check for common Installshield runtime errors and bugs here: http://consumer.installshield.com/common.asp?source=all . As I said, Basic MSI is quite OK, it is just the Installscript MSI that should be avoided.

The Installshield community is good too: http://community.installshield.com/ . As is Stefan Kruger's (MSI MVP) installsite.org with the community at forum.installsite.org.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164