Forum Discussion

Thylane's avatar
Thylane
Copper Contributor
Feb 09, 2026

How to launch a command in a command prompt at startup?

When Windows 10 starts, I would like to automatically launch a command line that requires the cmd.exe command prompt in administrator mode to launch correctly?
 
The task in question is the music server: Navidrome.
The Navidrome service launches fine at startup, but not the executable that provides access to the music database and web interface.
 
I tried to create a task at startup, but it won't launch:
 
SCHTASKS /CREATE /TN "navidrome" /TR "C:\Services\navidrome\navidrome.exe" /SC ONSTART /RL HIGHEST
 
It is well created and is on the task list:
 
SCHTASKS/QUERY
 
but it does not run at startup.
 
Do you have an idea to solve this problem? Thanks in advance.

3 Replies

  • Alfredui's avatar
    Alfredui
    Brass Contributor

    To automatically launch an executable like Navidrome in an elevated (administrator) command prompt at startup in Windows 10, creating a scheduled task with highest privileges is a good approach.

  • Amiasop's avatar
    Amiasop
    Copper Contributor

    Instead of using SCHTASKS directly from the command line, use Task Scheduler GUI for better control, or ensure your command has all necessary parameters.

  • Xaviery's avatar
    Xaviery
    Copper Contributor

    Create a scheduled task that runs cmd.exe with administrative privileges. Use the task to execute a command that starts Navidrome. Make sure the task is configured with "Run with highest privileges" and set to run at system startup.