We can also run the emacs server as a daemon on user init in Windows. We take advantage of the user startup folder, where you can put a batch script or shortcut which will be executed on user login.

  1. Go to the Roaming startup folder by either opening Run Command (Win+R) and typing shell:startup, or

opening the Windows Explorer (Win+E) and typing shell:startup in the address bar

  1. Create a shortcup by right-clicking, new->shortcut.

  2. Put the location of runeamcs.exe with the --daemon flag, e.g. "C:\msys64\mingw64\bin\runemacs.exe" --daemon

  3. Right click the the newly created shortcut, and edit the the init location to some convenient folder,

e.g. your documents folder: %USERPROFILE%\Documents

  1. (optional) Rename the shorcut to something more meaningful, e.g. emacs_daemon.exe

To connect to the daemon instead of creating a new Emacs instance, you need to invoke emacsclientnw.exe instead of emacs.exe. To create a shortcut to the client:

  1. Right-click on the Desktop area, new->shortcut

  2. In the location folder, enter "C:\msys64\mingw64\bin\emacsclientw.exe" -c -na "C:\msys64\mingw64\bin\runemacs.exe"

  3. To pin it to the taskbar, double-click on the new shorcut, and in the Emacs taskbar, right-click in the emacs icon-> pin to taskbar

https://www.emacswiki.org/emacs/EmacsMsWindowsIntegration