Windows 10: How to use RunAs without password prompt? Solved

Page 1 of 2 12 LastLast
  1.    10 Jun 2018 #1

    How to use RunAs without password prompt?


    I tried to use RunAs to start and program as admin.
    After entering this command:

    RunAs.exe /user:Administrator "regedit.exe"

    it shows prompt to enter password.

    Is possible to override password prompt by any way?
    Or enter password in command?

    Thank you for help.
      My ComputerSystem Spec

  2.    10 Jun 2018 #2

    Are you logged into an account with admin privilege?
      My ComputerSystem Spec

  3.    10 Jun 2018 #3

    I have only one account and it's admin acccount.

      My ComputerSystem Spec

  4.    10 Jun 2018 #4

    You are telling the runas program to use the built-in account named "Administrator." If you're logged into an administrator account you can simply launch an administrative PowerShell or Cmd.exe session and run the regedit program without invoking the other account. Thus, for example because I don't have the built-in account enabled at present (it's disabled by default), here's what happened when I ran your command, followed by simply typing regedit.exe (which launched the registry editor with admin privileges just fine):
    Click image for larger version. 

Name:	image.png 
Views:	5 
Size:	53.3 KB 
ID:	191783

    PS: you can check the status of the built-in administrator account by typing "net user administrator" at an administrative command prompt or in an administrative PowerShell session. Here's how I know for sure that the administrator account is not active on my PC:
    Click image for larger version. 

Name:	biadmin-info.jpg 
Views:	4 
Size:	223.9 KB 
ID:	191784
      My ComputersSystem Spec

  5. Brink's Avatar
    Posts : 33,147
    64-bit Windows 10 Pro build 18262
       10 Jun 2018 #5

    Hello Miro,

    If you like, you could create an elevated shortcut to "Run as administrator" without getting a UAC prompt.

    Create Elevated Shortcut without UAC prompt in Windows 10 | Windows 10 Tutorials
      My ComputersSystem Spec

  6.    10 Jun 2018 #6

    I have UAC turned off.
    What a purpose is to run any program as admin:
    I want to add to context menu of desktop, drive and folder run as admin 2 cmd alternatives to access selected destination as admin.
    Console.exe "%1"
    use command which starts it as admin.
    Of course edited by Registry Editor.

      My ComputerSystem Spec

  7.    11 Jun 2018 #7

    EdTittel said:
    PS: you can check the status of the built-in administrator account by typing "net user administrator" at an administrative command prompt or in an administrative PowerShell session.

    As the SID for the local Administrator is a constant, I use the following PowerShell cmdlet (as part of a diagnostic script that appends to a text file):
    Get-WmiObject Win32_useraccount | Where-Object {$_.SID -like '*-500'} | Select Name, Disabled
    Click image for larger version. 

Name:	is-admin-enabled.jpg 
Views:	38 
Size:	47.2 KB 
ID:	191901
    (Of course, you can always omit Name from the Select statement to make it even shorter.)

    Hope this helps...
      My ComputerSystem Spec

  8.    11 Jun 2018 #8

    I don't know if it helps, really I meant that it is easier to start program as admin from command line...

      My ComputerSystem Spec

  9.    11 Jun 2018 #9

    1. Create a shortcut to the Registry Editor then right-click on the shortcut and choose Properties.
    2. Click on the Advanced button (a) then put a tick in the Run as administrator checkbox (b).
    3. Click on each of the OK buttons to dismiss the dialogs.

    Click image for larger version. 

Name:	regedit-as-admin.jpg 
Views:	2 
Size:	144.7 KB 
ID:	191908

    Alternatively, you can also use tools like AutoHotkey to run programs elevated. For example, the following also runs the Registry Editor as Administrator:
    ; Prompt to 'Run as Admin', i.e. elevated
    If Not A_IsAdmin
       Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
    Run %windir%\regedit.exe
    Hope this helps...
      My ComputerSystem Spec

  10.    11 Jun 2018 #10

    Even I'm using and creating AHK scripts...
    I think we lost main problem - please forgive me that's not at beginning of thread.

    So, why and what I need?

    I need to add to context menu of drive, desktop, folder opening two cmd.exe alternatives (Take Command and Console) as admin.
    I have in context menu of these destinations cmd.exe yet - but it's downloaded from web, not my work.

    For making it more clear here's context menu of folder background (empty place of File Explorer opened folder):
    cmd.exe /s /k pushd "%V"⧹
    Other destinations are similar or the same.
      My ComputerSystem Spec

Page 1 of 2 12 LastLast

Related Threads
No Password Prompt on Sign in page in User Accounts and Family Safety
Hello,For last 2-3 days when I turn on my desktop, it is bypassing my Macrium Reflect / Win 10 Boot option screen and opens to the std win 10 splash screen and just sits there? There is no sign-in on the screen? Only thing in the bottom RH corner is...
One of scores and scores of people having home network connection issues...when prompted for the password, etc, when trying to access a network share (another desktop in the house)...This may sound stupid...but what is the attached jpg network...
At Windows startup a login prompt with a password box, user account picture or name does not appear. All i see is my screen saver background. I found a temporary fix which is restarting my computer, then and only then can i type in my password to...
Hi all, I was wondering how to make Windows UAC prompting me for my PIN be the default behavior, instead of prompting for my password? I have just reinstalled Windows 10 on my laptop. I used to be able to do that. Now that I have reinstalled...
I tried the runas command to configure some software I just updated, as the directions said, but my administrator password was rejected. Then I tested the runas command on a pdf file that I know for sure is in the current directory (it can open from...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 22:06.
Find Us