Tek
03-13-2005, 04:46 PM
Hmm... I could have swore that when I was using the trial version of SF7 (7.0.1.0) before purchasing it last week and getting the latest version (7.0.2.0) that I was able to use variables in dialog messages. I had it working and now it's displaying the variable name rather than its contents.
I use a variable called %ProductNameShort% to display the name of the software being installed in a short form (sort of like saying Windows XP instead of Microsoft Windows XP) in my session variables, but it doesn't seem to use it in dialog messages. This variable is working correctly in other areas of the installer where it is not displayed in a dialog message. The other variable in this code that I use is %OMTEXE% which is just the name of the main executable set in the session variables as well. I handle dozens of software products and the more that I can use session variables, the easier it is for me to copy one SF7 project to another and make as little changes as possible.
Here is my code that I use in my 'On Startup' actions:
-- Check for the existence of a pre v2.1.0 installation and abort if true
EXEExist = File.DoesExist("%AppFolder%\\%OMTEXE%");
EXEVersionInfo = File.GetVersionInfo("%AppFolder%\\%OMTEXE%");
EXEVersion = EXEVersionInfo.FileVersion;
if (EXEExist) and (EXEVersion < "2.1.0.24") then
result = Dialog.Message("Older Version Detected", "Setup has detected that you currently have an older version of ".."%ProductNameShort%".." installed prior to version 2.1.0.\nYou must first uninstall any existing ".."%ProductNameShort%".." software before installing this version.\n\nYou can uninstall previous versions from the Control Panel under Add/Remove Programs.\n\nSetup will now close.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
Application.Exit(0);
end
Am I missing something? Did something change?
Confused,
Tek
I use a variable called %ProductNameShort% to display the name of the software being installed in a short form (sort of like saying Windows XP instead of Microsoft Windows XP) in my session variables, but it doesn't seem to use it in dialog messages. This variable is working correctly in other areas of the installer where it is not displayed in a dialog message. The other variable in this code that I use is %OMTEXE% which is just the name of the main executable set in the session variables as well. I handle dozens of software products and the more that I can use session variables, the easier it is for me to copy one SF7 project to another and make as little changes as possible.
Here is my code that I use in my 'On Startup' actions:
-- Check for the existence of a pre v2.1.0 installation and abort if true
EXEExist = File.DoesExist("%AppFolder%\\%OMTEXE%");
EXEVersionInfo = File.GetVersionInfo("%AppFolder%\\%OMTEXE%");
EXEVersion = EXEVersionInfo.FileVersion;
if (EXEExist) and (EXEVersion < "2.1.0.24") then
result = Dialog.Message("Older Version Detected", "Setup has detected that you currently have an older version of ".."%ProductNameShort%".." installed prior to version 2.1.0.\nYou must first uninstall any existing ".."%ProductNameShort%".." software before installing this version.\n\nYou can uninstall previous versions from the Control Panel under Add/Remove Programs.\n\nSetup will now close.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
Application.Exit(0);
end
Am I missing something? Did something change?
Confused,
Tek