Subject: bug#75013: Windows binary installer ignores user options for Start menu shortcuts

From: Corwin Brust <[email-masked]>
Date: Sat, 21 Dec 2024 13:46:39 -0600

Thanks much for looking into issues/fixes with the binary installer
for Windows, Francis!  "Promoting" your comments to a bug report here,
as I think you've uncovered an undocumented (and fixable + worth
fixing) thing.

On Sat, Dec 21, 2024 at 12:29 PM Francis Wright <[email-masked]> wrote:
>
> Hi Corwin
>
> Thanks for working on this. The "greedy uninstaller" was a bit of a pain. I tried your installer []
> and the associated uninstaller seems to work correctly, i.e. it only uninstalls emacs-30.0.93, which is great. I didn't notice any of the other issues you listed.
>

Yay!

> However, I did notice a couple of problems. Firstly, Windows pops up a warning from Microsoft Defender SmartScreen, which is not a new problem and is easy to work around.

This I think I am not currently able to do much about, alas.

> Secondly, the installer did not install a shortcut folder. On the Choose Start Menu Folder dialogue, Emacs-30.0.93 was pre-selected, and I ensured that Do not create shortcuts was not selected. The only button available was the Close button, which I clicked. A shortcut for Emacs itself was installed but not the shortcut to the folder containing Emacs and the uninstaller. (I can add the folder shortcut by hand.)
>

Thanks for reporting this issue.  I confirmed it exists also with the
29.4 released binary installer.  When I select "show details" I can
see at the end of the unpacking ("installation") processing step it
creates start-menu short-cuts; however, the screen where we choose
whether or not we want to install short-cuts isn't shown until after
the unpacking step -which I now see does short-cut creation, but
shouldn't- is completed.  There is some code in the nsi script which
might be doing the write thing in the wrong place, at first glance.
In any case, with the present (for some time) installer we get a
"hard-coded" incorrect value for a start menu shortcut that is always
created irrespective of relevant choices offered to the user by said
installer.  Not great.

I'll look into fixing this for the 30.1 installer, also, replying back
in here if/when I have an "_3" that seems to warrant others' testing
effort.

Since this "short-cut page ignored" issue doesn't seem already to have
been captured in the bug tracker I have directed this reply such as to
create a new bug-report.  I'll try to arrange to get additional
relevant comments I/we make back on devel show up in the new bug
report (I don't have the number yet, as I write this), but: feel free
to address replies back to original devel thread (or otherwise to this
new bug thread) as you think best.

> Best wishes,
> Francis

Gratefully,
Corwin