uninstall - Using ${StrTok} in NSI script -


i have written small nsi script substring, parsed comma :

!include "strfunc.nsh" ${strtok}  outfile abc.exe  section "jj" main_section  sectionend   function .oninit  ${strtok} $0 "b,lah" "," "l" "0"  functionend 

the above code works fine. when tried use strtok in uninstall macro, keeps giving me "invalid command:{strtok}" error.

could please let me know :

  1. how use 'strtok' in uninstall macro?

  2. in above snippet of code , why 2nd line required? signify?

thanks!

the first ${strtok} creates function , after calls function. use in uninstaller must use ${unstrtok}:

!include "strfunc.nsh" ${strtok} ${unstrtok}  section   ${strtok} ... sectionend  section uninstall   ${unstrtok} ... sectionend 

edit: here example (tested nsis v2.46):

!include "strfunc.nsh" ${unstrtok}  !macro uninstall  ${unstrtok} $1 "b,lah" "," "l" "0" ; messagebox mb_ok $1 delete "$temp\un.exe" !macroend section "uninstall" !insertmacro uninstall sectionend section "install" writeuninstaller "$temp\un.exe" sectionend 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -