如何跳过 inno setup 中选择的特定任务的启动消息?
我想在安装后启动程序,如果用户在安装过程中选中相应的复选框(即;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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果要删除
Launch Runtimne Win32
安装后选项,请添加 Task 参数以排除 Service 任务:If you want to remove the
Launch Runtimne Win32
post install option, add the Task parameter to exclude the Service task: