Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   How to get the parent directory (http://forums.winamp.com/showthread.php?t=279394)

jiake 19th October 2007 09:36

How to get the parent directory
 
For example the script:

!include "MUI.nsh"
SetCompressor /SOLID lzma
InstallDir "$PROGRAMFILES\MYPROGRM"
......
Section Client
${GetParent} $INSTDIR $R0
......
SetOutDir "$R0\TEST"
......

When compiling,it said:

Invalid command: ${GetParent}

How to use the function "${GetParent}"?Help me!

The help give the follow code:

Section
${GetParent} "C:\Program Files\Winamp\uninstwa.exe" $R0
;$R0="C:\Program Files\Winamp"
SectionEnd

But I test it,it can't be compiled!

kichik 19th October 2007 10:49

You must declare you'll be using this function before actually using it by adding !insertmacro GetParent at the top as explained in the introduction.

jiake 19th October 2007 17:06

Thank u very much!!!


All times are GMT. The time now is 17:52.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.