当 Inno Setup 中的注册表值仅使用默认名称时,如何获取该值?
我正在尝试使用 Inno Setup 的 Pascal 脚本从 Windows 注册表(本例中为 Google Sketchup)获取应用程序的安装目录,以便我可以在那里安装插件。
该注册表项没有名称,在 Regedit 中只有“(默认)”。
我尝试了这个:
RegQueryStringValue( HKLM, 'SOFTWARE\Google\Google Sketchup 6', '(Default)', pluginLoc );
但它没有返回值。 有什么建议么?
I'm trying to get the install directory of an application from the Windows Registry (Google Sketchup in this case) with Inno Setup's Pascal scripting so I can install a plugin there.
The registry key doesn't have a name, it just has "(Default)" in Regedit.
I tried this:
RegQueryStringValue( HKLM, 'SOFTWARE\Google\Google Sketchup 6', '(Default)', pluginLoc );
but it doesn't return a value. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需将
SubKeyName
留空,如下所示:底层 API 调用的匹配文档适用于 RegQueryValueEx(),其中指出:
Just leave the
SubKeyName
empty, like so:The matching documentation for the underlying API call is for RegQueryValueEx(), which states: