Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

To check OS in dialog editor, 'Condition tab of a button'


7 replies to this topic

suvidha

suvidha
  • Members
  • 72 posts

Posted 14 June 2001 - 17:31

I know where to put a condition, but i do not know how can OS (win95/win98/win2000/winNT) be checked ?

i want to do something like:
Make two custom actions and make the condition of one custom action as:

GetSystemInfo(OS,...) == win2000 OR winNT

and make 'Condition of second custom action as:
GetSystemInfo(OS,...) == win95 OR win98
   
This is urgent!!
any help will be greatly appreaciated..



Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 14 June 2001 - 23:45

You need to use the Version9X and VersionNT properties.  For details on their values and how to use them, look up Operating System Properties in the Windows Installer help files.

suvidha

suvidha
  • Members
  • 72 posts

Posted 16 June 2001 - 00:14

i made two custom actions for one, SOURCE is windows folder and for another custom action it is system folder.

For the OK button (dialog editor of  SetupCompleteSuccess) i wrote:

DoAction read_file_win98 LAUNCHEREADME AND Version9X

DoAction read_file LAUNCHREADME AND VersionNT

but while building the project it gives an error:
c:\WINNT\Notepad.exe not found
Version9X it is a RUN-TIME property so, i copied the notepad.exe in windows folder and compiled the project.
Now, if i run the setup thus created on Win98 an error shows up "This program has performed illegal operation"
BUT if i build this project on win98 and then run it it gives no errors nd opens redme file perfectly!!

pl help


tgebbie

tgebbie
  • Members
  • 26 posts

Posted 16 June 2001 - 01:46

You can use the InstallScript function that will retrieve the OS from the local system that the install is running on:

GetSystemInfo ( OS , nvResult , svResult );

TDG


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 June 2001 - 18:39

I guess like the problem is in youre custom action. Looks like you are including notepad.exe in your setup, instead of calling the one that exists on the target system.

suvidha

suvidha
  • Members
  • 72 posts

Posted 17 June 2001 - 19:54

i am not including notepad.exe in my project.

here is what i have done:

i have made 2 custom actions both of
Type Binary_table.
In the binarytable, 1st custom action :
Source: <systemfolder> otepad.exe
Target: [INSTALLDIR]\README.TXT

and 2nd one points to:
Source: <windowsfolder> otepad.exe
Target: [INSTALLDIR]\README.TXT

Then i call these 2 custom actions in OK button of SetupCompleteSuccess dialog box based on conditions of OS (pl see my earlier post for this).

If i compile the project on win98 and run setup it runs fine and opens the readme.txt but if i compile on winNT or win2000 and then run it on win98 (or win95) it gves "illegl program termination" error (if  "Show me readme file" checkbox is checked on SetupCompleteSuccess dialog box)

I am using Installshield Professional Windows Installer 2.0.


Please advice..

Note: Before compiling the project (on winNT) i needed to copy a notepad.exe in windowsfolder


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 June 2001 - 20:42

So you are storing notepad.exe in the binary table...
Use a custom action of type "Stored in the directory table".

suvidha

suvidha
  • Members
  • 72 posts

Posted 19 June 2001 - 17:14

Thanks for the help, it works fine now.