tarkinheld
14th January 2004 11:41 UTC
Distinguish Win9x <-> XP, W2k
Hi there,
I know the plugin to get the current Windows system/version. But I don't know how to use it to activate different parts of the code (a simple "IF.. ELSE ..").
Anybody knows the solution for doing that?
Background: under Win9x I have to make an entry in the registry to install a service, else I'm using the Service plugin.
Vytautas
14th January 2004 12:00 UTC
Tjis code should help you out (derived from the nsis help file):
Push $R1
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
IfErrors lbl_win9x lbl_winnt
lbl_win9x:
;insert code for 9x here
goto lbl_end
lbl_winnt:
;insert code for nt here
goto lbl_end
lbl_end:
Pop $R1
Vytautas ;)
Joost Verburg
14th January 2004 12:04 UTC
Check for the registry key
HKLM, "SOFTWARE\Microsoft\Windows NT\CurrentVersion", CurrentVersion
When it exists, it's Windows NT (NT4, 2000, XP).
For information about conditional execution, see http://nsis.sourceforge.net/site/ind...&tx_faq_faq=25