在nsis中使用inetc :: post的"URL部件错误"

Thi*_*nka 2 installer nsis

我正在使用nsis开发安装程序.作为最后一步,有一个注册过程,用户可以获取他的电子邮件地址和其他一些数据并将其发送到服务器.代码如下.

StrCpy $ContactName "$0"
StrCpy $ContactEmail "$1"
StrCpy $Coments "$2"
StrCpy $Updates "$3"
StrCpy $PostStr "userName=$ContactName&userEmail=$ContactEmail&userComments=$Coments&updates=$Updates"

inetc::post "$PostStr" "http://www.mysite.com/registration/registerAcceptor.php" "$INSTDIR\output.txt"

Pop $0
StrCmpS $0 "OK" success failedToSubmit
failedToSubmit:
    MessageBox MB_OK|MB_ICONEXCLAMATION "There was an error submitting the registration information"
Return

success:
MessageBox MB_OK|MB_ICONINFORMATION "Your information was successfully received by OrangeHRM"
Run Code Online (Sandbox Code Playgroud)

但是,当用户尝试注册时,第一次给出错误消息

"There was an error submitting the registration information"
Run Code Online (Sandbox Code Playgroud)

当我使用如下消息检查命令的返回值时

MessageBox MB_OK $0
Run Code Online (Sandbox Code Playgroud)

它显示以下错误

URL Parts Error
Run Code Online (Sandbox Code Playgroud)

但是当我返回并继续执行相同的操作时,它会给出成功消息,返回值也是如此

OK
Run Code Online (Sandbox Code Playgroud)

我不确定为什么这个东西在这两种情况下会有两种不同的方式.有人可以帮忙吗

提前致谢.

And*_*ers 6

尝试添加"/ END"作为在建议的插件调用这个论坛主题(有可能是在堆栈上其他的东西,插件不知道什么时候停止阅读,这可以解释为什么它的作品第二次左右)