Select Components based on OS
How can I select or deslect a component based upon the user's operating system?
Example - I have multiple components, the first is always required, and the rest are OS-dependant. The 3 OS-dependent components are marked with "/o" switch, I want the component to select itself, based upon the user's os.
> Package 1: Required
> Package 2: Windows 98 Only
> Package 3: Windows ME Only
> Package 4: Windows XP Only
I've tried using the GetWindowsVersion function, but I cannot use it outside of a function/component, and it does not seem to be able to add/remove the "/o" switch for me.
Any ideas?
Sample Code follows
Section "Application (Required)" SecApp
SectionIn RO
;Files, shortcuts, and the like...
SectionEnd
Section /o "System Files (98 Only)" SecWin98
;98-specific files
SectionEnd
Section /o "System Files (ME Only)" SecWinME
;ME-specific files
SectionEnd
Section /o "System Files (XP Only)" SecWinXP
;XP-specific files
SectionEnd