资深软件分享者
感谢你一路陪伴

Inno setup 访问注册表键值,获取软件安装路径

[Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{C5FE0C14-DFF6-414B-9B11-4BDDE48DA588}
AppName=钢筋切割工具
AppVersion=1.0
AppPublisher=***科技有限公司
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
DisableDirPage=no
DefaultDirName={code:GetInstallString}

[Languages]
Name: “chinesesimp”; MessagesFile: “compiler:Default.isl”

[code]
function GetInstallString(Param:String): String;
var
sInstallPath: String;
begin
sInstallPath := ”;
if RegValueExists(HKLM, ‘SOFTWARE\WOW6432Node\Bentley\Installed_Products\{075603A2-0EEA-42F2-971F-2D675F5555E2}’, ‘ProgramPath’)
then
begin
RegQueryStringValue(HKLM, ‘SOFTWARE\WOW6432Node\Bentley\Installed_Products\{075603A2-0EEA-42F2-971F-2D675F5555E2}’, ‘ProgramPath’, sInstallPath)
Result := sInstallPath;
end else
begin
MsgBox(‘读取注册表键值错误’, mbInformation, MB_OK);
end
end;

[Files]
Source: “C:\Users\70744\Desktop\测试文件\ProStructuresNet.dll”;  DestDir: {app}\mdlapps; Flags: ignoreversion
Source: “C:\Users\70744\Desktop\测试文件\PSX_PlugInBase.dll”;  DestDir: {app}\mdlapps; Flags: ignoreversion
Source: “C:\Users\70744\Desktop\测试文件\RebarAddin.dll”;  DestDir: {app}\mdlapps; Flags: ignoreversion
Source: “C:\Users\70744\Desktop\测试文件\RebarAddin.dll.config”;  DestDir: {app}\mdlapps; Flags: ignoreversion
Source: “C:\Users\70744\Desktop\测试文件\RebarAddin.cfg”;  DestDir: {app}\config\system; Flags: ignoreversion

; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”

——本页内容已结束,感谢你的支持!——

赞(1) 打赏
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《Inno setup 访问注册表键值,获取软件安装路径》
文章链接:https://www.zhijinxuanlv.com/1484.html
本服务条款的解释权与修改权属于织金旋律博客。详情 免责声明 相关声明
如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意。
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
你还可以点击蓝色字体加入交流群: 博客群 会员群 加群请填写注册的用户名。

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏

My title page contents