Skip to content
⌘ NSIS Forum Archive

Can this be done with NSIS?

4 posts

lostprophet#

Can this be done with NSIS?

Okay, only have a simple job for NSIS, can it be done with it?

I want a single CAB file, to be installed to a directory if it's running under XP, and into another if it's Vista/7. No, I don't want the CAB file to be unzipped, just to be put into a specific directory.

If somebody could lend me a hand with that, or provide a link, I would be grateful🙂

Thanks in advance.
MSG#
Very easy. Look at winver.nsh (together with logiclib.nsh):

${If} ${IsNT}
${AndIf} ${IsAtMostWinXP}
etc
${ElseIf} ${IsAtLeastWinVista}
etc2
${EndIf}

or something similar.

Edit: If you want to learn using NSIS, start with NSIS\Examples\Example1.nsi and example2.nsi, and use the command reference to find out what commands do: http://nsis.sourceforge.net/Docs/Chapter4.html