• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Shotgunbunny · Apr 07, 2015 at 09:29 AM · serverwindows

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Shotgunbunny · Apr 07, 2015 at 01:32 PM 0
Share

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.

avatar image
0

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Shotgunbunny · Apr 07, 2015 at 12:54 PM 0
Share

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

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

Headless mode checkbox is uncheckable 1 Answer

Connecting multiple platforms to one server 2 Answers

Windows Server 2008 R2 64 Bit 3 Answers

a question about Client/Server programming in Unity 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges