Archive: uninstaller copy


if I copy unistaller in another directory and start deinstaller, than the line "Delete from" point to parent directory. How can I change it?


The uninstaller's $INSTDIR is the directory in which it is located. You can simply copy another value to $INSTDIR. You'd probably want to save the installer's $INSTDIR in the registry and load it in the uninstaller.


thk.
I copy in $INSTDIR "c:\demo"
after that I copy unistaller in another direcotry:
c:\example\myunistaller´
and MessageBox schow c:\demo,
but TextBox on the first page of unistaller "delete from"
show on c:\example


Section Un.Init

StrCpy $INSTDIR "c:\demo"
MessageBox MB_OK $INSTDIR

SectionEnd

Section Uninstall
; 2 times for my sure
StrCpy $INSTDIR "c:\demo"
MessageBox MB_OK $INSTDIR

SectionEnd


un.onInit should be a function, not a section.

Function un.onInit
StrCpy $INSTDIR C:\demo
MessageBox MB_OK $INSTDIR
FunctionEnd

that's it!