Windows 10: Run .BAT as admin without UAC prompt?

Discus and support Run .BAT as admin without UAC prompt? in Windows 10 Software and Apps to solve the problem; Edit: Marked as "Solved", because it looks like under Win 10 I can no longer do this quite the way I used to in Win 7, and I have multiple suggestions... Discussion in 'Windows 10 Software and Apps' started by Doghouse, Feb 8, 2017.

  1. Doghouse Win User

    Run .BAT as admin without UAC prompt?


    Edit: Marked as "Solved", because it looks like under Win 10 I can no longer do this quite the way I used to in Win 7, and I have multiple suggestions as to alternate approaches, any one of which ought to work.

    ((Moved from the "General" forum))

    Can anyone help? I am trying to run a .BAT script that needs admin privileges, and I need to lose the annoying UAC prompt. I found out how to do that under Win 7, but can't get the same approach to work under Win 10.

    I have created a task with "Run with highest privileges" to start my script. I then attempt to start it from a desktop shortcut. That works fine under WIn 7, and I've seen a couple of tutorials saying that it works under WIn 10 as well - but I can't get it to.

    If I run the new task from within Task Scheduler, to check it out, it does exactly what I expect it to.

    When I simply attempt to run it from the desktop shortcut (using a command of format schtasks /run /tn "mytask"), though, all that happens is that a window of some sort pops and disappears way too fast for me to see what it is trying to tell me (I've tried looking in event viewer for some sort of indication as to what it's objecting to, but can't see anything relevant). Under Win7, my script would execute successfully at this point.

    If I finally cave in and choose to launch the shortcut with "Run as Administrator", the script executes OK - but that merely triggers the very UAC prompt I'm trying to avoid.

    The account I'm using is an administrator. My script, amongst other things, executes runas.exe to launch a .EXE file under a second admin account.

    Any bright ideas? Or other ways to achieve the same result?

    :)
     
    Doghouse, Feb 8, 2017
    #1
  2. Abby_PR Win User

    Run As Administrator - Windows10

    Hi,

    In Windows 10....

    I would like to run the command prompt as admin (but without doing the runas administrator) each time I need admin priv..

    so I created a bat file as follows:

    @echo off

    runas /user:domain\admin /savecred "%SystemRoot%\system32\cmd" - saved this as admin_bat

    Now the first time it runs it prompts for the admin password when entered it (saves the credentials) and runs fine after that (even after rebooting)..

    But My question is : When I run explorer or control command from the new DOS (admin_bat) - its throws access denied error.. why is it? isn't the new command prompt opened as administrator with full access???.. if not, what should I do to open it with full
    permissions

    ( note: requirement is whenever the admin_bat is clicked UAC should not pop-up and should login in directly)?

    Thanks
     
    Abby_PR, Feb 8, 2017
    #2
  3. UAC allows users to install software without admin rights?

    Hi Everyone,

    It has come to our attention that our users can in fact install software without an admin account or an admin present. This is done simply by then doing the following:

    The user downloads the app / package.

    User runs install.

    User is presented with UAC.

    User puts their own username and password in presses enter and the software carrys on.

    Surely, UAC should not allow the user to proceed to install software? This is all enabled via Group Policy and everything is defined as it should be.

    Not sure why UAC is failing like this? Any suggestions would be greatly appreciated.

    **Just found**

    When a user right clicks on a program and selects "Run as Administrator". Uses their own details it runs happily. Almost as if domain users have admin rights?
     
    AshleySmithNZ, Feb 8, 2017
    #3
  4. Kyhi Win User

    Run .BAT as admin without UAC prompt?

    You could disable UAC via control panel...

    I have a lot of scripts that bypass the admin - but UAC always pops-up
     
    Kyhi, Feb 9, 2017
    #4
  5. Doghouse Win User
    I could, sure. But that's a bit like cutting off a leg because you've lost your toenail clippers. In principle I'm happy with UAC being on. This is for something I run regularly, and trust; I was looking for something a little less... ...extreme.

    Plus, frankly, it's frustrating that something that worked OK under Win 7 doesn't seem to want to work under Win 10, when it's not obvious why it shouldn't (and when other people also seem to think that it still should). I'd like, if I can, to understand why, and whether it can be made to.
     
    Doghouse, Feb 9, 2017
    #5
  6. CountMike New Member
    It's part of tightened security in W10. Can't have both security and letting anything to run loose without at least a warning.
     
    CountMike, Feb 9, 2017
    #6
  7. topgundcp Win User
    Create a reg file with code below and merge into the registry to avoid UAC prompt from bat file:
    Windows Registry Editor Version 5.00

    Code: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{E2F13B98-650F-47DB-845A-420A1ED34EC7}User\Software\Microsoft\Windows\CurrentVersion\Policies\Associations] "LowRiskFileTypes"=".exe;.bat;.cmd;.vbs" [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations] "LowRiskFileTypes"=".exe;.bat;.cmd;.vbs"[/quote]
     
    topgundcp, Feb 9, 2017
    #7
  8. clam1952 Win User

    Run .BAT as admin without UAC prompt?

    clam1952, Feb 9, 2017
    #8
  9. Doghouse Win User
    Except that I can set a trigger on my task and have it run (say, at a time of my choosing) successfully, without further interaction, and without a prompt. Or run it straight from the Task Scheduler. But if I want to launch it conveniently...?

    Apparently, even though I'm an admin, I'm not safe with matches.
     
    Doghouse, Feb 9, 2017
    #9
  10. Doghouse Win User
    Thanks. If all else fails, I'll probably go that route.
     
    Doghouse, Feb 9, 2017
    #10
  11. Doghouse Win User
    Thanks, I'll take a look.

    (Edit: Haven't tried this yet, but you're probably right that this should work; plenty of people discuss taking this approach, but every reference I see now talks about "programs". I guess that WIn 7 was slightly more lax in allowing .BAT as well.)
     
    Doghouse, Feb 9, 2017
    #11
  12. Kyhi Win User
    Guess, I'll have to do a little testing with the suggestions above, as well...
    Thanks..
     
  13. topgundcp Win User

    Run .BAT as admin without UAC prompt?

    topgundcp, Apr 5, 2018
    #13
Thema:

Run .BAT as admin without UAC prompt?

Loading...
  1. Run .BAT as admin without UAC prompt? - Similar Threads - Run BAT admin

  2. UAC prompts with QuickAssist, elevated Admin

    in Windows 10 Gaming
    UAC prompts with QuickAssist, elevated Admin: The quick explanation of how to "unblock" UAC prompts on the remote, from the assisting PC, is, from the assisting PC:1 Open cmd.exe non-elevated on the remote computer.2 Execute runas /user:Administrator cmd3 In the resulting elevated prompt, execute all one...
  3. UAC prompts with QuickAssist, elevated Admin

    in Windows 10 Software and Apps
    UAC prompts with QuickAssist, elevated Admin: The quick explanation of how to "unblock" UAC prompts on the remote, from the assisting PC, is, from the assisting PC:1 Open cmd.exe non-elevated on the remote computer.2 Execute runas /user:Administrator cmd3 In the resulting elevated prompt, execute all one...
  4. no option to run anyways on uac prompt

    in Windows 10 Gaming
    no option to run anyways on uac prompt: my uac prompts dont have any option to run anyways and its really bothering https://answers.microsoft.com/en-us/windows/forum/all/no-option-to-run-anyways-on-uac-prompt/e93d121a-a856-4fe3-b5ac-34be424e1c78
  5. no option to run anyways on uac prompt

    in Windows 10 Software and Apps
    no option to run anyways on uac prompt: my uac prompts dont have any option to run anyways and its really bothering https://answers.microsoft.com/en-us/windows/forum/all/no-option-to-run-anyways-on-uac-prompt/e93d121a-a856-4fe3-b5ac-34be424e1c78
  6. UAC not prompting admin credentials

    in Windows 10 Gaming
    UAC not prompting admin credentials: Hi everyone, i'm having a problem with uac in my domain, when i'm running softwares installations i'm not getting the option to enter admin credentials when i'm opening the software installation as administrator.Thanks...
  7. UAC not prompting admin credentials

    in Windows 10 Software and Apps
    UAC not prompting admin credentials: Hi everyone, i'm having a problem with uac in my domain, when i'm running softwares installations i'm not getting the option to enter admin credentials when i'm opening the software installation as administrator.Thanks...
  8. UAC not prompting admin credentials

    in Windows 10 Customization
    UAC not prompting admin credentials: Hi everyone, i'm having a problem with uac in my domain, when i'm running softwares installations i'm not getting the option to enter admin credentials when i'm opening the software installation as administrator.Thanks...
  9. UAC prompt - .bat

    in AntiVirus, Firewalls and System Security
    UAC prompt - .bat: Windowsversion: 1903 Hey guys I have been trying to find a topic that explained exactly what I needed. Think is, I have a file that I would like to run, but don't want to type in my administrator each time. I'd like right click on the file, and then be able to click on a...
  10. Using Admin Account with UAC Prompting for Credentials?

    in User Accounts and Family Safety
    Using Admin Account with UAC Prompting for Credentials?: I just installed Windows 10 and my local user account is a Local Admin Account. However, under Local Security Policy settings, I set the UAC Prompt to Prompt for Credentials on the Secure Desktop (for Admin accounts). Can I also use this account to browse the web, check...

Users found this page by searching for:

  1. run cmd as admin without uac

    ,
  2. install bat runas uac promt

    ,
  3. run .bat as admin without uac prompt windows10

    ,
  4. start windows 2016 admin kommand vbs as admin without password without prompt,
  5. windows run bat as admin,
  6. uac cant run bat file as administrator,
  7. run as admin without UAC prompt,
  8. run as administrator no uac,
  9. run as admin without uac,
  10. run cmd as administrator,
  11. .bat admin,
  12. run .bat autounattend.xml uac,
  13. run-bat-admin-without-uac-prompt,
  14. run bat as admin without uac,
  15. run bat no uac\