Skip to content
⌘ NSIS Forum Archive

Get the drive of installation

5 posts

akswift#

Get the drive of installation

Hel:ßlo,
i want to get the drive Name of where the programm is to be installed.

For example my programm files go to:

C:\Programme\Myapp

Then i want to get the drive C:\
akswift#
It works, but not in an uninstall section

At the beginig i inserted:

!insertmacro GetRoot

and than:

${GetRoot} $INSTDIR $5

I get the Error:

!insertmacro: GetRootCall
Call must be used with function names starting with "un." in the uninstall section.
Usage: Call function_name | [:label_name]
kichik#
That's because you have to use the "un." prefix.
!insertmacro un.GetRoot
# ...
${un.GetRoot} $INSTDIR $5