Create Elevated Shortcut without UAC prompt in Windows 10  

Page 20 of 25 FirstFirst ... 101819202122 ... LastLast

  1. Posts : 190
    Windows 10, 22H2 10.0.19045
       #190

    Wow, that was fast . . . and it works perfectly! Thank you.

    I dabble with software only because the whole area fascinates me. Always make a MR backup image before trying to "fix" (and I use that term in the loosest possible meaning) anything. Just for my curiosity, what did you change?
      My Computer


  2. Posts : 7,607
    Windows 10 Home 20H2
       #191

    @Brink, can you upload the following updated version, in which the problem reported by Homer712 has been fixed?

    Create_an_elevated_shortcut.bat

    Homer712 said:
    Just for my curiosity, what did you change?
    Take Registry Editor, i.e. regedit.exe, for example.

    The previous version will run "%windir%\regedit.exe"
    The updated version will run cmd.exe /c start "Registry Editor" "%windir%\regedit.exe"

    That is the difference. Thank you for reporting the subtle problem, which I did not notice at all!
      My Computer


  3. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #192

    Matthew Wai said:
    @Brink, can you upload the following updated version, in which the problem reported by Homer712 has been fixed?

    Create_an_elevated_shortcut.bat

    Take Registry Editor, i.e. regedit.exe, for example.

    The previous version will run "%windir%\regedit.exe"
    The updated version will run cmd.exe /c start "Registry Editor" "%windir%\regedit.exe"

    That is the difference. Thank you for reporting the subtle problem, which I did not notice at all!
    Thank you Matthew. The .bat file in option 1 has now been updated for this.
      My Computers


  4. Posts : 190
    Windows 10, 22H2 10.0.19045
       #193

    I'm probably pushing it now, but in the previous version it was possible to "minimize" the desktop shortcut and all you got was this tiny little split second flash in the task bar. With the new version the "minimize" of the shortcut does nothing and you still get that big black cmd window flashing on the screen. Short, yes, but wondering if there's anything that can be done/set to stop that. And it seems that the first instance after every restart is the worst, seems to get shorter with each additional launch.
    Last edited by Homer712; 28 Jan 2021 at 10:26.
      My Computer


  5. Posts : 7,607
    Windows 10 Home 20H2
       #194

    @Homer712, do you mean the following "Minimized"? It works at my end. I see no big black CMD window flashing. Even if it flashes, the flashing will last no more than 0.1 second. Not a problem at all.

    Create Elevated Shortcut without UAC prompt in Windows 10-minimized-shortcut.jpg
      My Computer


  6. Posts : 190
    Windows 10, 22H2 10.0.19045
       #195

    I'm sure it is fine, everything happens a bit slower on this older laptop. Don't change anything. Works perfectly!
      My Computer


  7. Posts : 1
    Win 10 Pro
       #196

    Hey there! Fantastic application btw. I read through all of the forum comments and from what it sounds like, there is no automated solution to bypass the UAC without some sort of manual interaction, correct? I'm trying to create a batch file that essentially never triggers the UAC as a local administrator, but the more I look into it, the less possible that becomes. I do understand that Option 2 works manually, and option 1 is almost perfect, but I was just wondering if anyone here had any feedback. Thank you for the information though! This forum was a good read.
      My Computer


  8. Posts : 106
    Windows 10 Home 22H2
       #197

    Hello,

    I have a rather simple requirement i.e, open an elevated CMD (not the built-in hidden administrator account but the manually created Admin account) from a standard CMD by inputting the password in the command line itself. I'm trying to avoid bringing up the GUI UAC prompt at all costs because it brings my system to a crawl with the a Disk-Usage spike to 100%. It can take up to a minute for things to normalize.

    I've tried using the Runas command with all the variations (unnecessary) in syntax without luck. The one time I got it to run in fluke, it still asked for elevation upon trying to run an elevated command.

    I have the hidden Administrator account disabled and it rightly throws up an error as expected.
    Code:
    C:\Users\NAME>runas /user:NAME-P-V\ADMINISTRATOR CMD
    Enter the password for NAME-P-V\ADMINISTRATOR:
    Attempting to start CMD as user "NAME-P-V\ADMINISTRATOR" ...
    RUNAS ERROR: Unable to run - CMD
    1327: Account restrictions are preventing this user from signing in. For example: blank passwords aren't allowed, sign-in times are limited, or a policy restriction has been enforced.
    It's the manual Admin A/c elevation that I'm after but it fails saying password is incorrect when it's in fact correct.
    Code:
    C:\Users\NAME>runas /user:NAME-P-V\Admin CMD
    Enter the password for NAME-P-V-pc\Admin:
    Attempting to start CMD as user "NAME-P-V-pc\Admin" ...
    RUNAS ERROR: Unable to run - CMD
    1326: The user name or password is incorrect.
    I do have to point out that manual Admin A/c which I've named ADMIN shows up as NAME P V in the net user command for some reason.
    Code:
    C:\Users\NAME>NET USER
    
    User accounts for \\NAME-P-V
    
    -------------------------------------------------------------------------------
    Administrator            DefaultAccount           Guest
    GUEST 2                  NAME                    NAME P V
    WDAGUtilityAccount
    The command completed successfully.
    So, tried running it by enclosing the name within quotes but again no luck.
    Code:
    C:\Users\NAME>runas /user:NAME-P-V\"NAME P V" CMD
    RUNAS USAGE:
    
    RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
            /user:<UserName> program
    Also tried appending the computername above with -pc with the same result. Can someone point me in the right direction. I can't seem to figure out where I'm going wrong.

    Thank you

    Edit: Enclosed the whole path "NAME-P-V\NAME P V" within quotes and it did open a new CMD window this time but still fails to run an elevated command.

    Code:
    C:\Windows\system32>POWERCFG REQUESTS
    This command requires administrator privileges and must be executed from an elevated command prompt.
    Looks like it's the harmless swearing
    Last edited by BRAC; 08 Sep 2021 at 04:32.
      My Computer


  9. Posts : 10
    Windows 10 Enterprise 2016 LTSB
       #198

    @Brink, your bat script worked well. Just posting to show my appreciation. Thanks!
      My Computer


  10. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #199

    whalp said:
    @Brink, your bat script worked well. Just posting to show my appreciation. Thanks!
    I'm glad it could help, but Matthew Wai wrote the BAT to help.
      My Computers


 

Tutorial Categories

Create Elevated Shortcut without UAC prompt in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
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 03:26.
Find Us




Windows 10 Forums