如何使用 Inno Setup 获取系统显示名称?
如何获取文件、目录或文件夹的系统显示名称,就像在系统文件浏览器中显示的那样?例如,原始 CD 以某种方式命名,我想做一点复制保护
How can I get system display name of a file, directory, or folder as it would be displayed in a system file browser? For example original CD is named somehow and I want to do little copy protection
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Inno Setup 不提供此类功能。但是,您可以轻松编写自己的 DLL 来调查安装程序的 CD 驱动器的标签。在 Pascal 中,只需执行
Inno Setup 即可让您在安装程序中包含 DLL,并在安装过程中调用这些 DLL 中的函数。当然,您的设置必须告诉 DLL 函数其文件名,以便 DLL 函数可以使用正确的驱动器。您不能仅仅假设它是
D:\
。Inno Setup provides no such functions. However, you can easily write your own DLL that investigates the label of the CD drive of the setup program. In Pascal, just do
Inno Setup lets you include DLLs with your setup, and call functions in these DLLs during setup. Of course, your setup must tell the DLL function its filename, so that the DLL function can use the right drive. You cannot just assume it is
D:\
.