InstallShield:处理带有特殊字符的密码
我有一个安装程序(InstallShield/InstallScript),在安装过程中,它使用调用 Windows advapi32.dll LogonUser 函数的外部简单 C# 应用程序来验证用户名/密码。 (我知道InstallShield提供了自己的验证功能,我们在这方面遇到了一些问题,因此我们这样做)。
但是,当尝试处理具有特殊字符的密码时,例如 Abcde"12
或 Abcde21"
,引号消失,密码变为(在这两种情况下)Abcde12
。用引号将其包围仅对第二种情况有帮助(当“出现在末尾时)。尝试用\”替换“的每个实例也没有帮助。
有什么想法吗?
谢谢。
I have an installer (InstallShield/ InstallScript) and during the installation process it verifies username/ password, using external simple C# application which calls Windows advapi32.dll LogonUser function. (I know that InstallShield provides its own function for verification, we had some problems with that and because of that we do this in that way).
But, when trying to handle paswords with special characters, like Abcde"12
or Abcde21"
, the inverted commas disappeared and the password becomes (in both cases) Abcde12
. Surrounding it with inverted commas helped just for the second case (when the " appeared at the end). Trying to replace each instance of " with \" didn't hepl as well.
Any idea?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许也尝试转义反斜杠,看看它是否有效?
意义:
Maybe try to escape the backslash as well and see if it works?
Meaning: