- Home /
Automatically starting a Unity exe on Windows startup
Hi folks,
I've been trying to have my Unity application startup automatically when my Windows server boots. It's vital that the program starts without having to log on to the server.
I've tried using the Task Scheduler. After running a task, I can actually see the .exe in my Task Manager. However, the application screen never shows up and the application cannot be connected to. Pointing the Task Scheduler to a .bat file makes no difference.
Has anyone managed something like this?
Edit: I should mention that running the bat file manually works just fine.
Edit 2: Also, copying a shortcut to the Startup folder DOES NOT WORK since it requires a user to log on to the system. I want the Unity application to start without having to log on.
Answer by Shotgunbunny · Apr 09, 2015 at 03:36 PM
I've discovered that Unity is unable to acquire a graphics device when run as a background process via Task Scheduler. This means that any Unity application that requires graphics cannot be run as a background process.
However, any non-graphics Unity applications can be run as a background process with the -batchmode command.
I ended up solving this problem by putting shortcuts in the Startup folder and then setting the server to automatically login to a restricted user. For more information on this, see this StackOverflow thread.
Answer by Woody3d7 · Apr 07, 2015 at 01:11 PM
Hello, It should be as simple as Right clicking and copying a shortcut to your Startup Folder. (go to START/All Programs and Right Click STARTUP Folder, select 'Explore', then copy a Shortcut to Startup folder. (Right-click+drag Unity.exe, left click 'create shortcut here')
Good Luck!
Robert
Some of my Animation: https://www.youtube.com/watch?v=NCD9tgWeZYQ
Please read my first post and the other answer. This solution requires a user to log on to the server before Unity will start. I'm looking for a solution where the Unity application will start without logging on.
Answer by jtok4j · Apr 07, 2015 at 11:37 AM
Perhaps these steps for Windows Server 2012 would work for you? Reference Link: http://www.tomshardware.com/forum/1043-71-program-startup-windows-server-2012
open run command (Winkey+R)->
type shell:Startup
This will open a window in the otherwise hidden AppData path for the Startmenu/Programs/Startup -> Add a shortcut to the executable for the program you want to start.
This will of course only apply to the logon account that you're using at the time.
For all users type shell:Common Startup
This is what I'm currently using. However, this requires a user to log on to the machine. I'm looking for a solution where the Unity application will start without logging on.
Your answer
![](https://koobas.hobune.stream/wayback/20220613192427im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Headless mode checkbox is uncheckable 1 Answer
Connecting multiple platforms to one server 2 Answers
Windows Server 2008 R2 64 Bit 3 Answers
Integrating Watson Speech-to-Text with Unity 1 Answer
a question about Client/Server programming in Unity 1 Answer