Kbase P21948: How to detect whether you are running on Windows NT, 2000 or
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/25/2003 |
|
Status: Unverified
GOAL:
How to detect whether you are running on Windows NT, 2000 or XP without using Windows API calls
FIX:
The following code can be used to determine what version of Windows an application is running on when the use of Windows API functions is not desired:
DEFINE VARIABLE cValue AS CHARACTER NO-UNDO.
LOAD "SOFTWARE\Microsoft\Windows NT".
USE "SOFTWARE\Microsoft\Windows NT".
GET-KEY-VALUE SECTION "CurrentVersion" KEY "ProductName" VALUE cValue.
IF cValue <> ? THEN
MESSAGE "You Are Running NT, 2000 or XP" VIEW-AS ALERT-BOX.
ELSE
MESSAGE "You Are Running 95, 98 or ME" VIEW-AS ALERT-BOX.
UNLOAD "SOFTWARE\Microsoft\Windows NT".