Old 9th March 2010, 19:41   #1
lostprophet
Junior Member
 
Join Date: Mar 2010
Posts: 2
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.
lostprophet is offline   Reply With Quote
Old 10th March 2010, 06:42   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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
MSG is offline   Reply With Quote
Old 10th March 2010, 10:54   #3
lostprophet
Junior Member
 
Join Date: Mar 2010
Posts: 2
Thank you, I'll try to figure it out with that in mind
lostprophet is offline   Reply With Quote
Old 10th March 2010, 16:12   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Use SetOutPath inside that if/elseif.

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump