Old 19th June 2012, 23:41   #1
RossW
Member
 
Join Date: Jun 2006
Posts: 54
Appending Year to InstallDir

I want to append the current calendar year to the InstallDir so that:

code:

InstallDir "C:\My App"



becomes:

code:

InstallDir "C:\My App 2012"



I tried using some of the date functions but since InstallDir is defined at the beginning of the .nsi file it throws an error (can only be used in a function).

Any ideas? I want this to show up in the setup wizard in the default install folder.
RossW is offline   Reply With Quote
Old 20th June 2012, 03:24   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,588
You can use !define /date and use the define with InstallDir OR you can set $instdir with StrCpy in .onInit at runtime

IntOp $PostCount $PostCount + 1
Anders 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