Skip to content
⌘ NSIS Forum Archive

NSIS push, pop and URLEncode

5 posts

theChaser#

NSIS push, pop and URLEncode

I'm trying to encode with URLEncode a strings in NSIS. I'm using a NSIS plugin called URLEncode. The problem is that I try encode 2 vars, but the first encoded var lost the value after I encoded the second var.

Push "${AFF_NAME}"
Call URLEncode
Pop $3
; // at this point the messagebox show the result good.
MessageBox MB_OK $3
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"
Push $0
Call URLEncode
Pop $0
; // now after second var encoded the result of first var $3 lost the value
MessageBox MB_OK $3 
Please Help I'm very new using NSIS and I dont know how do it good. I searching info but without success.

Very thanks !
Nutzzz#
I wasn't aware of System::Store S and L. Any reason to use it rather than doing a bunch of Push'es and Pop's (other than that it's sooo much simpler?) ;-)
Anders#
Probably depends on how many push/pops are required to really know what is best. A plug-in call is probably slower so with 10 or more push/pops you might consider switching, never really done any tests to find out.

I was on a small tablet and just took the easy way out.
theChaser#
Originally Posted by Anders View Post
I already answered you on Stackoverflow and updated the wiki.
Yes. Very thanks for your help. Now working perfect 😁