如何跳过 inno setup 中选择的特定任务的启动消息?

发布于 2024-12-10 11:25:52 字数 1178 浏览 0 评论 0原文

我想在安装后启动程序,如果用户在安装过程中选中相应的复选框(即;2 个安装类型独立和服务)。我有一个用于服务的复选框。所以只有一个任务。所以通常(默认情况下) )它将作为独立安装,并在安装后启动一个 exe。但是当我选择服务时,它将显示两个启动消息(即独立和服务)以在安装后执行。那么如何解决这个问题呢?

这是我通常使用的代码,

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkedonce
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

; Install for all users or current user only
Name: common; Description: &All users; GroupDescription: Install for:; Flags: exclusive unchecked
Name: local; Description: Just &me; GroupDescription: Install for:; Flags: exclusive
Name: Service; Description:Install as a Service; GroupDescription: Setup Type:; Flags: unchecked

[Run]
Filename: {app}\HMI.exe; Description: {cm:LaunchProgram,Runtimne Win32}; Flags: nowait postinstall skipifsilent;
Filename: {app}\ServiceTray.exe; Description: {cm:LaunchProgram,Runtimne Win32 as Service}; Flags: nowait postinstall skipifsilent runascurrentuser;Tasks: Service

我想启动程序(即,运行时 win32)如果用户选择服务,它会显示启动程序消息(即,运行时 win32 和运行时 win32 作为服务)。我只使用一个任务即服务; 那么除了使用2个任务之外还有其他解决方案吗?

i want to launch program after installation if a user checks a corresponding checkbox (ie;2 install type standalone and service)during the install.i have one checkbox that is for service.so there will be one task only.so normally(by default) it will install as standalone and it will launch one exe after installation.but when i select service,it will show both launch message(ie,standalone and service)to execute after installation. so how to solve this problem?

this is the code that i am using

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkedonce
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

; Install for all users or current user only
Name: common; Description: &All users; GroupDescription: Install for:; Flags: exclusive unchecked
Name: local; Description: Just &me; GroupDescription: Install for:; Flags: exclusive
Name: Service; Description:Install as a Service; GroupDescription: Setup Type:; Flags: unchecked

[Run]
Filename: {app}\HMI.exe; Description: {cm:LaunchProgram,Runtimne Win32}; Flags: nowait postinstall skipifsilent;
Filename: {app}\ServiceTray.exe; Description: {cm:LaunchProgram,Runtimne Win32 as Service}; Flags: nowait postinstall skipifsilent runascurrentuser;Tasks: Service

in this normally i want to launch program(ie,runtime win32)if user select service it is showing both launch program message(ie,runtime win32 and runtime win32 as service).i am using only one task ie,service;
so is there any other solution other than using 2 task?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

想你的星星会说话 2024-12-17 11:25:52

如果要删除 Launch Runtimne Win32 安装后选项,请添加 Task 参数以排除 Service 任务:

Filename: {app}\HMI.exe; Description: {cm:LaunchProgram,Runtimne Win32}; Flags: nowait postinstall skipifsilent; Tasks: Not Service

If you want to remove the Launch Runtimne Win32 post install option, add the Task parameter to exclude the Service task:

Filename: {app}\HMI.exe; Description: {cm:LaunchProgram,Runtimne Win32}; Flags: nowait postinstall skipifsilent; Tasks: Not Service
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文