Subject: Re: bug#8268: Windows Emacs Console persists while running running emacs.exe.

From: [email-masked]
Date: Sat, 11 Feb 2017 22:43:45 -0500

Juanma Barranquero <[email-masked]> writes:

> On Sun, Apr 3, 2011 at 12:46, oCameLo <[email-masked]> wrote:
>
>> Double click runemacs.exe in the explorer, pin it to the taskbar, then
>> right click on the icon, change the target from emacs.exe to
>> runemacs.exe, click the icon, everything work fine.
>
> So the shortcut is created from a running instance of emacs.exe.
>
>> Drag runemacs.exe from the explorer to the taskbar, click on it,
>> another icon will apply to the taskbar.
>
> And this one is created from the executable.
>
>> The shortcut file (location in C:\Users\[User NAME]\AppData\Roaming
>> \Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar) created
>> by the 2nd way didn't have a System.AppUserModel.ID property.
>
> Sound quite logical, because the executable isn't associated with the
> "GNU.Emacs" ID until it runs and sets it itself.
>
> So this should be documented in nt/README.W32, and perhaps addpm.c
> should set the System.AppUserModel.ID property in the shortcuts it
> creates.

Something like this?

--- i/nt/README.W32
+++ w/nt/README.W32
@@ -94,6 +94,12 @@ See the end of the file for license conditions.
   (non-windowed) mode of operation is most useful if you have a telnet
   server on your machine, allowing you to run Emacs remotely.
 
+* Pinning Emacs to the taskbar (Windows 7 and higher)
+
+  After starting Emacs the first time, pin it to the taskbar, then
+  edit the properties (via shift-right-click) so that the executable
+  path to points to runemacs.exe instead of emacs.exe.
+
 * EXE files included
 
   Emacs comes with the following executable files in the bin directory.