简体   繁体   English

当我们使用 NSIS 运行安装程序时,如何默认在任务管理器中显示系统托盘图标和相应的可执行文件?

[英]How to show the Systray Icon and also the corresponding executable in the taskmanager by default when we run the installer using NSIS?

My requirement is: When i installed a software using NSIS, once the installation is successfully completed it should show a notification icon (systray icon).我的要求是:当我使用 NSIS 安装软件时,一旦安装成功完成,它应该显示一个通知图标(系统托盘图标)。

I am able to create the installer with the required dlls, executables and other files.我能够使用所需的 dll、可执行文件和其他文件创建安装程序。 But it is not showing the systray icon automatically.但它不会自动显示系统托盘图标。

Use ExecShell , Exec or ExecWait to start a new process:使用ExecShellExecExecWait启动一个新进程:

Section
SetOutPath $INSTDIR
File "something\Display.exe"
ExecShell "" "$INSTDIR\Display.exe"
SectionEnd

If you are using the Modern UI then you can put a run checkbox on the finish page instead if you want to give the user the option of not running the app:如果您使用的是现代 UI,那么如果您想让用户选择不运行该应用程序,则可以在完成页面上放置一个运行复选框:

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\Display.exe"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"

Section
SetOutPath $INSTDIR
File "something\Display.exe"
SectionEnd

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用NSIS安装程序默认显示详细信息 - How to show details by default with NSIS installer 使用 NSIS 创建安装程序时,如何为 exe 文件指定一个不同于标题栏图标的图标? - How to specify an icon for exe file which is different from the title bar icon when using NSIS to create an installer? NSIS - 如何获取安装程序可执行文件的文件名? - NSIS - how to get the filename of the installer executable? 如何替换NSIS安装程序中的默认徽标? - How to replace the default logo in NSIS installer? NSIS安装程序后启动可执行文件 - Starting executable after NSIS installer 如何在.nsh 或 nsis 安装程序中运行或执行.bat 文件(就像我们使用 cmd.exe 或其他方式手动运行.bat 文件一样)? - How to run or execute .bat file inside .nsh or nsis installer (same like we run .bat file manually using cmd.exe or else)? 如何通过NSIS安装程序运行doxygen? - How to run doxygen through NSIS installer? 使用 NSIS 从许可协议安装程序屏幕单击“打印”时,如何显示打印对话框以选择要打印的选项 - How to show the print dilaog to select the option to print when clicked on "print" from the license agreement installer screen using NSIS Nsis安装程序图标图像丢失 - Nsis installer icon image missing 在使用electronic-builder NSIS安装程序安装后运行时如何传递命令行参数 - How to pass command line arguments when run after install with electron-builder NSIS installer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM