如何在 NSIS 安装程序的完成页面上添加桌面快捷方式选项? [英] How to Add a Desktop Shortcut Option on Finish Page in NSIS installer?
本文介绍了如何在 NSIS 安装程序的完成页面上添加桌面快捷方式选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我第一次尝试使用 NSIS 现代用户界面创建安装程序.我想知道如何为用户添加一个选项(复选框),以便用户选择在完成页面(安装程序的最后一个屏幕)上创建桌面快捷方式,以及已经存在的运行 XXXX"选项.
I'm trying to create an installer using NSIS Modern User Interface for the first time. I would like to know how I can add an option (checkbox) for users to select to have a desktop shortcut created on the Finish Page (the last screen of the installer) in addition to the "Run XXXX" option that's already there.
推荐答案
如果您没有使用完成页面上的自述复选框,您可以使用它来执行您想要的任何操作:
If you are not using readme checkbox on the finish page, you can use it to perform whatever action you want:
Function finishpageaction
CreateShortcut "$desktopfoo.lnk" "$instdirfoo.exe"
FunctionEnd
!define MUI_FINISHPAGE_SHOWREADME ""
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION finishpageaction
这篇关于如何在 NSIS 安装程序的完成页面上添加桌面快捷方式选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文