Archive: running unistaller from .onInit function


running unistaller from .onInit function
Hi All , I have been searching the forum , google , you name it to get a working script for running the uninstaller from a installer.. there seems to be a often used Function .onInit, I initially used from the VLC installer script which didnt work , and since that have found an extended version of this function from oggcodecs_release.nsi

which has an added some extra code including an IfErrors after calling ExecWait '$0 _?=$INSTDIR'

Sadly this IfErrors is been triggered , so I want to know why? what is the error?

I am really trying to learn the nsis language now , where before I just copied code ,so I want to track down what i have done wrong. I have attached my installer script , If anyone has some time to look and point me in the right direction I would be very happy

take note im not sure if im writing all reg strings correctly??

what is the "law/rules" for writing the value of say:
PRODUCT_DIR_REGKEY ??

there doesnt seems to be good documentation on grasping what these types of values should be?:mad:


You should take a look at the included examples as well ;)
Especially the script makensis.nsi which is the actual nsis installer, might give you some clue.


still no luck
K ..I looked at the makensis.nsi script .. It wasnt really any help, as it has very customized uninstaller code and is not inline with the script i attached and the scripts I used as a reference for my code, I have been trying all sorts this morning and I cannot get the uninstaller to run.. ? Im attaching my script again , IF anyone knows why this is not working pls let me know


If $0 contains spaces then you won't get anything executing. Use ExecWait '"$0" _?=$INSTDIR'. Also make sure the path in $0 is valid.

Stu