NSIS 推送、弹出和 URLEncode
NSIS push, pop and URLEncode
我正在尝试使用 URLEncode 对 NSIS 中的字符串进行编码。我正在使用一个名为 URLEncode 的 NSIS 插件。问题是我尝试编码 2 个变量,但第一个编码的变量在我编码第二个变量后丢失了值。
Push "${AFF_NAME}"
Call URLEncode
Pop
;at this point the messagebox show the result good.
MessageBox MB_OK
ReadRegStr [=10=] HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"
Push [=10=]
Call URLEncode
Pop [=10=]
;now after second var encoded the result of first var lost the value
MessageBox MB_OK
请帮助我是 NSIS 的新手,我不知道该怎么做。我正在搜索信息但没有成功。
非常感谢!
我不知道 URLEncode plug-in 但 NSIS wiki 上有一个名为 URLEncode 的辅助函数,它无法保留寄存器。
您可以通过修改函数的开始和结束来修复它,使其看起来像这样:
; Start
Function URLEncode
System::Store S ; Save registers
Pop [=10=] ;param
...
Done:
Push
System::Store L ; Restore registers
FunctionEnd
; End
我正在尝试使用 URLEncode 对 NSIS 中的字符串进行编码。我正在使用一个名为 URLEncode 的 NSIS 插件。问题是我尝试编码 2 个变量,但第一个编码的变量在我编码第二个变量后丢失了值。
Push "${AFF_NAME}"
Call URLEncode
Pop
;at this point the messagebox show the result good.
MessageBox MB_OK
ReadRegStr [=10=] HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"
Push [=10=]
Call URLEncode
Pop [=10=]
;now after second var encoded the result of first var lost the value
MessageBox MB_OK
请帮助我是 NSIS 的新手,我不知道该怎么做。我正在搜索信息但没有成功。
非常感谢!
我不知道 URLEncode plug-in 但 NSIS wiki 上有一个名为 URLEncode 的辅助函数,它无法保留寄存器。
您可以通过修改函数的开始和结束来修复它,使其看起来像这样:
; Start
Function URLEncode
System::Store S ; Save registers
Pop [=10=] ;param
...
Done:
Push
System::Store L ; Restore registers
FunctionEnd
; End