inno setup打包MFC

本文详细介绍了一个使用InnoSetup创建的应用程序安装程序脚本。该脚本定义了应用程序的基本属性,包括名称、版本和发布者等,并设置了安装路径、压缩方式及文件复制规则等。此外还配置了桌面快捷方式、快速启动栏图标以及运行后的行为。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

; Script generated by the Inno Setup Script Wizard.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!



#define MyAppName "TEST"

#define MyAppVersion "1.0.1"

#define MyAppPublisher "TEST"

#define MyAppExeName "TEST.exe"



[Setup]

; NOTE: The value of AppId uniquely identifies this application.

; Do not use the same AppId value in installers for other applications.

; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)

AppId={{7A137EE6-DCEF-4435-8540-C972E19F283E}

AppName={#MyAppName}

AppVersion={#MyAppVersion}

;AppVerName={#MyAppName} {#MyAppVersion}

AppPublisher={#MyAppPublisher}

DefaultDirName={pf}\{#MyAppName}

DisableProgramGroupPage=yes

OutputBaseFilename=setup

Compression=lzma

SolidCompression=yes



[Languages]

Name: "english"; MessagesFile: "compiler:Default.isl"



[Tasks]

Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1



[Files]

Source: "C:\Users\xugen\Documents\Visual Studio 2010\Projects\ComRW\Release\SNRW.exe"; DestDir: "{app}"; Flags: ignoreversion

Source: "C:\Users\xugen\Documents\Visual Studio 2010\Projects\ComRW\Release\ReadMe.txt"; DestDir: "{app}"; Flags: ignoreversion

Source: "C:\Users\xugen\Desktop\mscomm32_ocx\mscomm32\MSCOMM.SRG"; DestDir: "{app}\Conf"; Flags: ignoreversion

Source: "C:\Users\xugen\Desktop\mscomm32_ocx\mscomm32\MSCOMM32.DEP"; DestDir: "{app}\Conf"; Flags: ignoreversion

Source: "C:\Users\xugen\Desktop\mscomm32_ocx\mscomm32\MSCOMM32.oca"; DestDir: "{app}\Conf"; Flags: ignoreversion

;Source: "C:\Users\xugen\Desktop\mscomm32_ocx\mscomm32\mscomm32.ocx"; DestDir: "{app}\Conf"; Flags: ignoreversion

;---------------

;这里是关键,打包安装自动注册

;---------------

Source: "C:\Users\xugen\Desktop\mscomm32_ocx\mscomm32\mscomm32.ocx";DestDir: "{app}\Conf";  Flags:   regserver

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]

Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"

Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon



[Run]

Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AgtNN

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值