phisuio
18th May 2007 05:55 UTC
${StrStrAdv} goes in .onInit but not in un.onInit?
Hi, I have this command in the .onInit function:
${StrStrAdv} $Path $Path "\" ">" "<" "0" "3" "0"
there it works fine, but when put into un.onInit it says:
Error in macro FUNCTION_STRING_StrStrAdv_Call
Any idea?
engine
18th May 2007 06:08 UTC
Use ${UnStrStrAdv} macro in uninstall functions and sections.
phisuio
18th May 2007 13:02 UTC
Hi,
thats a strange thing, I need other functions-call in various functions. Hm, strange, but anyway...
Thanks!!
phisuio
23rd May 2007 16:03 UTC
I tried accomplishing this as you told, my source:
Function un.onInit.
...
${UnStrStrAdv} $Path $Path "\" ">" "<" "0" "3" "0"
FunctionEnd
but I get this error:
!insertmacro: FUNCTION_STRING_UnStrStrAdv
!insertmacro: macro "FUNCTION_STRING_UnStrStrAdv" requires 0 parameter(s), passed 8!
Error in script "C:\Windows\Desktop\setup\setup.nsi" on line 96 -- aborting creation process
Any idea?
Afrow UK
23rd May 2007 16:24 UTC
Put ${UnStrStrAdv} at the top of your script as well like you do with ${StrStrAdv}. The docs specifically tell you to do this!
Stu
TrifonovS
28th June 2011 12:04 UTC
I don't like the idea to put all used macros (for example from StrFunc.nsh) at the top of my script and also to call different function on the installer's or uninstaller's part (without or with prefix Un). I made several specific for my needs function that don't need this. It is enough only to call the macro once in the code that I need it and without any prefixes (by the way I learned this from some examples). So I want to put some kind of shell to StrStrAdv (or similar macros) to be able to work like this too. But I don't know how to make it. Can anybody help me a little bit, please?
deguix
28th June 2011 21:43 UTC
Well, i'm sure I made it that way so that you wouldn't need to create an overhead on the uninstaller if you didn't need it on the uninstaller and vice-versa. Before being called outside sections/functions, it doesn't create overhead either.
I'm sure that's still reasonable... anytime you create a function, you are making the (un)installer bigger. Not that it matters now. It used to matter long time ago when I used diskettes.