Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
730 views
in Technique[技术] by (71.8m points)

windows - How to Add a Desktop Shortcut Option on Finish Page in NSIS installer?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...