Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Disable "Unity is running as administrator" popup warning

Discussion in '2022.2 Beta' started by spacefrog, Jun 10, 2022.

  1. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    709
    Maybe this has been posted/asked already and i did'nt find it...
    But please, by the love of god, let me disable this message popup

    I'm pretty aware of anything security related when running unity as administrator, so no need to remind me ever startup about this...
    Any commandline/startup option or something ?

    did not find anything in the alpha manual ...
     
    Novack likes this.
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,172
    Running Unity as admin is completely unsupported... there are certain editor features that just don't work when you run it as admin. Others do unexpected things/behave in a buggy way. We don't test it in that configuration and we can't really vouch for what it can do when run as admin.

    We don't have any mechanism to disable that popup, unless you're running the editor in batch mode (but I imagine that's not something you want to do).

    May I ask why you're running Unity as admin? How often are you starting the editor in administrator mode that causes you so much annoyance?
     
  3. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    709
    Maybe its important to add that i'm on windows. Besides that i'm pretty curious why things should not work when your user belongs to the administrator group ( again , talking about windows, dont care about MacOS, Linux or anything else )
    I would certainly like to know what features might behave like you describe when running under a user that belongs to the administrator group. At least on windows you would have to do pretty awkward things to make it like that
     
    Novack and EvOne like this.
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,172
    This dialog is only present on Windows, so I am aware you're on Windows. This dialog is not about running Unity when your user belongs to the administrator group. Administrator group users normally run applications non-elevated since Windows Vista & UAC was introduced in 2007. Because most Windows users belong to administrator group, before this existed, every program ran as administrator and it was not uncommon to accidentally brick your computer.

    Running an application elevated (= as administrator) is equivalent of running an application via "sudo" on Linux or Mac. To run an application as administrator, one of three conditions have to be satisfied:

    1. Application was explicitly launched that way (via right clicking and pressing Run as Administrator);
    2. Application was launched by another application that is currently running as administrator (that can happen in Unity if Unity Hub was launched as administrator for whatever reason);
    3. Application manifest states that it only supports being run as administrator (generally used by installers, Unity doesn't have this manifest entry so it's not applicable).

    You can read about it here: https://docs.microsoft.com/en-us/wi...ccount-control/how-user-account-control-works

    Regarding to what doesn't properly work: over the last few years, we received quite a few bug reports about it. It ranges from slight behaviour differences (drag & drop behaves weirdly) to some features being completely non-functional (like speech recognition). This is because Windows API often behaves differently if you're running the application as administrator and it is largely outside of our control. Applications aren't meant to be run as administrator, so various edge cases pop up frequently. Unfortunately I don't have an exhaustive list of things at my fingertips and we likely don't even know about everything because we do not test Unity in this configuration.
     
    mahdi_jeddi likes this.
  5. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    709
    Thanks for the detailed response, i understand now that the dialog is specific to the built-in administrator only
    Anyways, in my whole time using Unity i never come across an issue that might be caused by or even linked to running unity elevated/as built-in admin. Or any one in your list.
    But i understand that the dialog will not go away, as i'm the uncommon dog here as it seems

    Regarding why i run my machine that way:
    I constantly, always and since ever do things on my machines that potentially "brick the machine", in fact that trains to not brick it and know exactly what one is doing. I constantly touch and bend "core" windows things to not have it get them in the way. But i see thats nothing for the broad masses. , so we can end this discussion

    BTW: this is my 666'th post .... coinsidence ?
     
    Last edited: Jun 10, 2022
  6. OleJorgensen

    OleJorgensen

    Joined:
    Aug 9, 2015
    Posts:
    2
     
  7. OleJorgensen

    OleJorgensen

    Joined:
    Aug 9, 2015
    Posts:
    2
    Hi. I would very much like to know how not to run as Administrator, and get rid of the Popup. I've checked Settings in Hub and Unity and nono seems to be elevated but never the less i get the warning. I'm the only user on the PC and as such I am the admin, but i take it from the comments here that's not an issue. Please advice.
    Thanks Ole Jørgensen
     
    Novack likes this.
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,172
    I posted some troubleshooting steps here: https://forum.unity.com/threads/unity-2022-2-is-now-available.1363123/#post-8655807

    If they don't work, can you add the "Elevated" column in the task manager and show the values of it for both Unity.exe and UnityHub.exe while this dialog is being displayed?
     
  9. Nextovoy

    Nextovoy

    Joined:
    Dec 21, 2015
    Posts:
    2
    Hey!
    I have a similar problem. Unity Hub is launched with elevated rights, but there is no check mark in the properties. I do not know what to do with it. In the pop-up window, the "Restart" button does not help to start the editor with normal user rights.
    I'm not sure, but it seems to me that the first task is launched without elevated permissions, and the rest with elevated permissions.

    kr2LowvW3G.png PDExjYGPUs.png
    "С повы..." - elevated
    "Да" - Yes
    "Нет" - No
    "Выполняется" - run/running
    "Запускать эту программу от имени администратора" - running as administrator

    UPD:
    I'm sorry I write so often. It looks like an installer bug. I decided to completely remove the Unity editor and Unity Hub and repeat the installation from 0. It looks like when you download the Unity Hub installer, run it with elevated rights to install Unity Hub, and at the end of the installation leave the daw active - run Unity Hub, then Unity Hub starts with elevated rights, and then the editor installation follows Unity and Visual Studio and much more.

    When I removed this checkmark and launched Unity Hub after the installer had completely finished working, Unity Hub started without elevated rights, as it should be.

    The problem has completely disappeared.

    UPD 2:
    I have also enabled UAC on level 2.
     
    Last edited: Jan 12, 2023
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,172
    Does Unity Hub continue running as administrator if you reboot the machine?
     
  11. ToruTheRedFox

    ToruTheRedFox

    Joined:
    Dec 22, 2015
    Posts:
    6
    I have UAC disabled on my account (I take the proper precautions with stuff I download online, don't worry) and as a result I get this popup every time I launch Unity

    there should be a way to just tell Unity that you accept the risk and make it go away as these kinds of situations make it impossible to run it without Administrator privileges without changing system settings and rebooting your machine
     
    Novack likes this.
  12. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,544
    Seriously, don't run end-user software as Administrator. Anyone doing it is just asking for problems, and anyone depending on it needs to rethink it.
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,172
    And yet you downloaded Unity :D.

    Running Unity as Administrator is not supported. Period. Random things will break because we rely on running as standard user. We kept getting bug reports because people ran Unity as administrator and that broke functionality.
     
  14. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    831
    To be honest that is a rather unpolite and borderline unprofessional answer, and I'd ask you to please reconsider how you address people in the forums. On top of that, you need to realize that your viewpoint may be flawled, so refrain from shutting down people viewpoints like that.

    Now Im suffering that senseless msgbox, and when I come to the forums to read about it, I found that:
    • The purpose of such msg, is to cover Unity from accountability in case of complains about some exotic bugs that no one even knows for sure what may be.
    • Someone decided that Unity should not be supported when running on a configuration that results inconvenient for Unity devs.
    WHAT? o_O

    So in practical and professional terms, this is what I would expect:
    • Unity should support running Unity as administrator, but simply list the known issues that its devs consider are related to such scenario, and beyond their control. You know, standard stuff.
    • Unity devs in the forums should be open to exchange and address people with politeness, understanding that sometimes the decisions they take are against the daily experience of thousands of other devs.
    To add to my perspective, I'd like to enumerate:
    1. We are only asking for a checkmark for that msg box to go away, because is in the way of the daily work of devs who need to run things on their desktops in a certain way.
    2. Secondly, disabling UAC is a perfectly valid setup option, and I have been working like that on my desktop environments for more than a decade. Unity should not be declaring a certain configuration unsupported.
    3. I have also been using Unity for about 15 years, but just now when updating to 2022.2.1f1 (from 2022.1) started getting that annoying msgbox.
     
    Last edited: Jan 23, 2023
  15. Nextovoy

    Nextovoy

    Joined:
    Dec 21, 2015
    Posts:
    2
    Yeap. I would like to clarify that UAC on Windows was disabled immediately after it was installed. And that leads to this annoying message. After enabling UAC - Unity Hub began to run without elevated permissions. It is noteworthy that further disabling UAC did not lead me to this annoying message. Magic.
     
    DimonddD and Novack like this.
  16. Novack

    Novack

    Joined:
    Oct 28, 2009
    Posts:
    831
    Oh jeez that did the trick! Thanks a ton for sharing. As you mentioned, I just enabled UAC, restarted, ran Unity, then disabled back UAC and the pestering message is gone. All we needed! As usual, the community to the rescue :)

    Edit:
    It is also worth noting that the result of that is that Unity no longer runs as elevated, and thus the message is no longer displayed. This is a solution for those devs with UAC disabled, but some devs actually required to run Unity as administrator (I've read some devkits require that) will still struggle with the senseless situation.
     
    Last edited: Mar 24, 2023
    DimonddD likes this.
  17. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,172
    I'm glad you guys found a solution.

    No target platforms Unity supports require you to run the editor as administrator.
     
  18. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    124
    Hello,

    I am not sure where to ask, but here seems the right-ish place.

    Since updating to 2022.2, our automated builds (which run not in batch mode, for lightmapping reasons), no longer execute. Unity simply hangs when being run from the command line.

    I cant seem to figure out why unity might be trying to run elevated. The user account is not admin, Jenkins is not elevated, and we dont have any "run as administrator" box ticked. This is a really big issue for us at the moment.

    Any help sorting this out would be amazing.

    Thanks
     
  19. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,172
    Are you sure it's the administrator pop up and not something else? If it is, perhaps Jenkins is running as a service instead of a user mode application?

    In either case, you should use the "-automated" command line argument to suppress any kind of user prompts from the editor.
     
  20. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    124
    Thanks so much for the speedy reply!

    You are correct, jenkins is running as a service.

    I have never seen -automated and can't find it documented anywhere in the unity docs.

    This did however, solve the issue, so thank you very much!

    I am not 100% sure its the administrator pop up, Unity just straight up hangs when being launched. Nothing is logged, and it sits there spinning for forever. This is new since 2022.2. It's pretty hard to diagnose exactly what the issue might be.

    That said, problem solved haha

    Thanks :)
     
  21. IrtezaRmasud

    IrtezaRmasud

    Joined:
    May 19, 2020
    Posts:
    13
    if you have checked run as administrator in unity .exe file then disable it cause unity doesn't find it safe to do this. If it is happening suddenly then this solve is for you.
    Because somehow some program or you have selected NEVER NOTIFY FOR ANY CHANGE in UAC (user account control settings). Search fro UAC or user account control is search and Pull that to option notify(check the screenshot) will disable this nasty warning which is appearing from nowhere every time. Then restart your computer.

    **Be careful from cracked games and software. Some malwares are able to modify your windows settings without letting you know anything and will make your computer unusable.
    What Always notify is telling is every time some app or program tries to make change it will let you know and until you press yes it won't proceed further.
     

    Attached Files:

  22. Max256

    Max256

    Joined:
    Apr 16, 2020
    Posts:
    30
     
    AGregori likes this.