How to run an .exe application as a background task on startup
I have a certain application that runs by creating a window on startup, and when you try to minimize the application it just closes the main frame and runs in the background. I was wondering how you can make it run in the background on startup instead of popping up. I have Windows 10 Home, if that information is needed.
Solution 1:
Try setting the application to start with the Task Scheduler
. If you configure it to run with the System account, it should remain hidden:
Solution 2:
Shortcut files allow you to specify how you want the program to launch. Here's one way to do what you're asking, assuming the program is in your Start menu Startup directory:
- Open Windows Explorer (you can use Win+E for this).
- Paste this path into the location bar:
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup
. If you don't see your program there, try this location instead:%programdata%\Microsoft\Windows\Start Menu\Programs\Startup
- Right-click the program (it'll actually be a link file, with a little arrow in the corner of the icon) and select
Properties
. - Go to the
Shortcut
tab of the window that opens (if you didn't start there). - One of the options will be
Run:
with a drop-down next to it (probably sayingNormal window
). Change the drop-down toMinimized
. - Hit OK (if you get a UAC prompt, allow the action).
The next time you log in, the program will still run... but it will be minimized from the start, which probably means it won't even appear. You can try launching it directly from Windows Explorer to see what this will look like.
Solution 3:
What I do is start the application with a VBS script. When doing this no (console) window is visible, and in task manager you see the process running under 'Background Processes'
Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.Run "c:\x\myapp.exe", 0
Set WShell = Nothing
safe this snippet, for example in 'run.vbs'
now run from command line (or task schedular)
> wscript run.vbs
Open the Task Manager, and you'll see the application is running as background process.