Raquelita
11th July 2008 09:42 UTC
eXtract different files depending on the OS
Hi all,
I want to extract different files depending on the OS version.
So in the installing section I would like to use something like:
File $actualOS\myDirectory\myOSspecificFile.ext
but this files on compiling as theres no such file.
What would be the right way to do this?
gracias
R :)
kichik
11th July 2008 13:47 UTC
Use WinVer.nsh to determine the OS and extract the appropriate files.
${If} ${IsWin98}
File win98.txt
${Else} ${If} ${IsWinNT4}
File nt4.txt
${EndIf}
theblase
31st July 2008 13:23 UTC
More detailed help
Hi,
I need the same solution to "Windows XP + 2000" (first option) and for Vista (second option). I don't know how to apply this code:
${If} ${IsWin98}
File win98.txt
${Else} ${If} ${IsWinNT4}
File nt4.txt
${EndIf}
in my nsis installer script.
Thanks in advance!
Comperio
31st July 2008 15:43 UTC
I assume based on your post that you DON'T want to install if they are on Windows 98 or ME? If so, this might be more appropriate:
${If} ${AtMostWinME}
MessageBox MB_OK "Windows too old"
${Else}
${If} ${IsAtMostWinXP}
; code for windows 2000/XP
${Else}
; code for Windows Vista
${EndIf}
${EndIf}
(PS: If you had posted your question like this in your
original thread, you may have already gotten an answer.)
theblase
8th October 2008 17:03 UTC
Your message was wrong! Here is the correct one!
# Installer sections
Section -Main SEC0000
${If} ${IsWin2000}
;code for Windows 2000
${Else}
${If} ${IsWinXP}
;code for Windows XP
${Else}
${If} ${IsWin2003}
;code for Windows 2003
${If} ${IsWinVista}
;code for Windows Vista
${Else}
${If} ${AtLeastWin2000}
MessageBox MB_OK "Running on Windows 2000 or better!"
Abort
${EndIf}
${EndIf}
${EndIf}
${EndIf}
${EndIf}