Create Elevated Shortcut without UAC prompt in Windows 10  

Page 21 of 25 FirstFirst ... 111920212223 ... LastLast

  1. Posts : 10
    Windows 10 Enterprise 2016 LTSB
       #200

    Brink said:
    I'm glad it could help, but Matthew Wai wrote the BAT to help.
    Thanks @Matthew Wai

    By the way, is there a way to cd /d to current directory after running cmd.exe?

    Thank you
      My Computer


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

    You may manually copy the shortcut from the desktop into the current directory.
    Or do you mean the application is in the current directory?
      My Computer


  3. Posts : 10
    Windows 10 Enterprise 2016 LTSB
       #202

    Matthew Wai said:
    You may manually copy the shortcut from the desktop into the current directory.
    Or do you mean the application is in the current directory?
    Sorry, the context is I am using this bat script to run cmd as admin, and paring the output shortcut to this context menu .reg hack.

    While it works and it opens cmd, it does not change to current directory. It just points to path (i.e., system32).

    I have to
    Code:
    cd /d foo/bar
    each time to change the directory. I was just wondering if there is anything else I can do to have it point to the current directory as it runs the cmd shortcut or something...

    Thanks,
    Welp

    Edit: added context, and I guess this is was I was trying to get at
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #203

    Hello @whalp,

    whalp said:
    I have to . . .
    Code:
    cd /d foo/bar
    . . . each time to change the directory. Is there something I can change so that when it runs the generated shortcut, it opens cmd as admin and also changes directory to current directory?

    Have a look at this . . .

    > How to Add "Open Command Window Here as Administrator" Context Menu in Windows 10

    Also, have a look at the Related Tutorials at the BOTTOM of the above Tutorial [ there are a few ], as they may also be useful.

    I hope this helps.
      My Computer


  5. Posts : 10
    Windows 10 Enterprise 2016 LTSB
       #204

    Paul Black said:
    Wow, you are fast. Yea, I just saw that! Thanks for pointing me there.

    Though, I wonder if you can still use this batch method to achieve the same thing. I see that the task does
    Code:
    /c start "OpenCmdHereAsAdminNoUAC" "%windir%\System32\cmd.exe"
    . Is it possible to change directory to the current directory?
    Something like:
    Code:
    start "OpenCmdHereAsAdminNoUAC" "%windir%\System32\cmd.exe" /k cd /d "%currentDirectory%"
    Thanks
      My Computer


  6. Posts : 7
    Windows 10 x64
       #205

    This is BRILLIANT as worked but it a shame as i had to choose OPTION TWO doing all that work, i would Preferred OPTION ONE but it don't give us a name of our choice which is a show so hope there be a new version to give us a name we want [Like this in OPTION TWO, number 4]
      My Computer


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

    The task name will be the same as the application's name you enter. The same name is used so as to simplify the procedure.
      My Computer


  8. Posts : 7
    Windows 10 x64
       #207

    To Matthew

    i got it i see what you mean, my mistake, that great new as do not need to be "Elevated Command Prompt" but can in any name

    Thank

    - - - Updated - - -

    Last one, About the Task Scheduler "Elevated Command Prompt": Is there a way to backup the "App" FOLDER and not the multiple files in the "App" Folder
      My Computer


  9. Posts : 7,607
    Windows 10 Home 20H2
       #208

    Start Menu said:
    Is there a way to backup the "App" FOLDER
    I find it pointless to back up this folder: 👉 C:\WINDOWS\SYSTEM32\Tasks\Apps\
      My Computer


  10. Posts : 255
    Windows 10
       #209

    This doesn't work from Windows 10 22H2 onwards. It worked in 21H2. Microsoft blocked this workaround.

    All that happens when the shortcut runs, is that the program doesn't manage to get enough RAM to fully open, so it remains in some sort of limbo state where it doesn't show any graphical windows on the screen and you can only close it by right clicking its icon on the system tray to exit it.
      My Computer


 

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 18:46.
Find Us




Windows 10 Forums