Kodi running in the background as a UPNP-DLNA renderer

I need Kodi to be loaded and run at system start up, and act as a DLNA media renderer in the background even if no windows user is logged in.

I tried to set up a scheduled task in Windows’ administratin tools, and it apparently starts an instance of Kodi, but the programs does not show up as a DLNA renderer on the network (while instead it does, when run manually).

Why is that so?