1;====================================================
2; IsNT - Returns 1 if the current system is NT, 0
3;        otherwise.
4;     Output: head of the stack
5;====================================================
6Function IsNT
7  Push $0
8  ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
9  StrCmp $0 "" 0 IsNT_yes
10  ; we are not NT.
11  Pop $0
12  Push 0
13  Return
14
15  IsNT_yes:
16    ; NT!!!
17    Pop $0
18    Push 1
19FunctionEnd
20
21;====================================================
22; IsNT - Returns 1 if the current system is NT, 0
23;        otherwise.
24;     Output: head of the stack
25;====================================================
26Function un.IsNT
27  Push $0
28  ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
29  StrCmp $0 "" 0 unIsNT_yes
30  ; we are not NT.
31  Pop $0
32  Push 0
33  Return
34
35  unIsNT_yes:
36    ; NT!!!
37    Pop $0
38    Push 1
39FunctionEnd
40