views:

252

answers:

1

I created installer via NSIS. "c:\program files\myapp" is default folder for my application. But I need another default folder (for example c:\users\\AppData\myapp) in Windows Vista.

I found lot of Functions to determine Windows version, but I cannot call them before defining InstallDir variable. Any ideas how to do it?

+1  A: 

You can set $instdir in .OnInit, or use MultiUser.nsh

Anders
Thanks. StrCpy $INSTDIR "$LOCALAPPDATA\myapp" really works in .onInit.
jing