首先,让我们了解Inno Setup和SPAWNWND。Inno Setup是一种Windows操作系统上用于打包和发布软件的工具,而SPAWNWND则是一个用于在Windows操作系统上运行和配置服务的工具。
现在,让我们假设您正在构建一个由Inno Setup和SPAWNWND构建的Exe,并希望在UAC窗口上显示NOTIFYWND参数。
为了实现这个目标,您需要执行以下步骤:
在您的应用程序中使用Inno Setup打包您的应用程序,并添加一个SPAWNWND服务,可以通过以下代码实现:
// Inno Setup script
Setup
AppId=1D7A5470-942F-4649-8B69-122888AB0BA5
AppVersion=1.0.0+1
AppName=My App
AppPublisher=Me
AppPublisherURL=https://www.example.com
AppSupportURL=https://www.example.com
AppUpdatesURL=https://www.example.com
DefaultDirName={pf}\My App
DisableProgramGroupPage=yes
OutputDir=.
OutputBaseFilename=MyApp-1.0.0+1-windows-setup
Compression=lzma
SolidCompression=yes
SetupIconFile=
WizardStyle=modern
PrivilegesRequired=none
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
Languages
Name: "english"; MessagesFile: "compiler:Default.isl"
Tasks
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "launchAtStartup"; Description: "{cm:AutoStartProgram,}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Files
Source: "MyApp-1.0.0+1-windows-setup_exe*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Icons
Name: "{autoprograms}\"; Filename: "{app}\MyApp.exe"
Name: "{autodesktop}\"; Filename: "{app}\MyApp.exe"; Tasks: desktopicon
Name: "{userstartup}\"; Filename: "{app}\MyApp.exe"; WorkingDir: "{app}"; Tasks: launchAtStartup
Run
Filename: "{app}\MyApp.exe"; Description: "{cm:LaunchProgram,}"; Flags: nowait postinstall skipifsilent
没有搜到相关的沙龙
领取专属 10元无门槛券
手把手带您无忧上云