If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#31
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
In message , B00ze
writes: On 2017-06-27 15:11, Lionel Muller wrote: [] I would like, for example, someone to suggest a method of adding an "Open Admin cmd window here" in the right-click context menu list of options. You can use this: http://code.kliu.org/cmdopen/ [] Looks good: it is an "open command prompt here", but "can be used to open elevated command prompts." Without installing it to try, however: how does it do the admin-level prompt - is it just an extra context-menu option, or do you have to do something obscure? -- J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf Lewis: ... d'you think there's a god? Morse: ... There are times when I wish to god there was one. (Inspector Morse.) |
Ads |
#32
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
On Wed, 28 Jun 2017 21:47:55 -0400, Jason wrote:
On Tue, 27 Jun 2017 03:56:54 +0000 (UTC) "Lionel Muller" wrote in article oisl26$1hcd$1 How can I open the command prompt as administrator with elevated privileges without having to give up and resort to a menu based search and in the least number of mouse clicks or menu selections (using the classic menu) as possible? Define a desktop shortcut for cmd with admin privileges. I use it all the time. That's basically what I do when I set up each system here. I create a shortcut to cmd, give it admin privileges, then pin it to the taskbar. After that, one click gets me an elevated command prompt. Now and then I use the shift-right-click method if I need a prompt in a specific directory, but normally I don't care what the directory is. |
#33
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
For alt.comp.os.windows-10,alt.windows7.general J. P. Gilliver (John)
wrote: You can use this: http://code.kliu.org/cmdopen/ [] Looks good: it is an "open command prompt here", but "can be used to open elevated command prompts." Without installing it to try, however: how does it do the admin-level prompt - is it just an extra context-menu option, or do you have to do something obscure? These two new answers came too late for me as I solved adding the admin command prompt to the right click context menu in a different way which I don't really understand but it worked. E: Folder: RightClick a folder and you'll get a Windows Powershell menu. ShiftRightClick a folder adds the option to open a cmd window here. Creating & installing an inf adds the "cmd as Admin" option to both. http://img4.imagetitan.com/img.php?image=16_cmda_4.gif See below for the file "CmdHereAsAdmin.inf". ***** begin CmdHereAsAdmin.inf ***** [version] signature="$CHICAGO$" [CmdHereAsAdminInstall] CopyFiles = CmdHereAsAdmin.Files.Inf AddReg = CmdHereAsAdmin.AddReg [DefaultInstall] CopyFiles = CmdHereAsAdmin.Files.Inf AddReg = CmdHereAsAdmin.AddReg [DefaultUnInstall] DelFiles = CmdHereAsAdmin.Files.Inf DelReg = CmdHereAsAdmin.DelReg [SourceDisksNames] 55="CMD Prompt Here as Administrator","",1 [SourceDisksFiles] CmdHereAsAdmin.INF=55 [DestinationDirs] CmdHereAsAdmin.Files.Inf = 17 [CmdHereAsAdmin.Files.Inf] CmdHereAsAdmin.INF [CmdHereAsAdmin.AddReg] HKLM,%UDHERE%,DisplayName,,"%CmdHereAsAdminName%" HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\CmdHereAsAdmin.inf" HKCR,Directory\Shell\runas,,,"%CmdHereAsAdminAccel %" HKCR,Directory\Shell\runas\command,,,"%11%\cmd.exe /k cd /d ""%1""" HKCR,Drive\Shell\runas,,,"%CmdHereAsAdminAccel%" HKCR,Drive\Shell\runas\command,,,"%11%\cmd.exe /k cd /d ""%1""" [CmdHereAsAdmin.DelReg] HKLM,%UDHERE% HKCR,Directory\Shell\runas HKCR,Drive\Shell\runas [Strings] CmdHereAsAdminName="CMD Prompt Here as Administrator PowerToy (Uninstall only)" CmdHereAsAdminAccel="CMD here as Admin" UDHERE="Software\Microsoft\Windows\CurrentVersion\ Uninstall\CmdHereAsAdmin" ***** end CmdHereAsAdmin.inf ***** |
#34
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
For alt.comp.os.windows-10,alt.windows7.general B00ze wrote:
You can use this: http://code.kliu.org/cmdopen/ WinAero Tweaker also has an option to add Open Admin Prompt to context menu in Explorer but the menu entry is a bit long so I prefer using Kliu's... I installed WinAero Tweaker and looked in the context menu section. All I see is the ability to add an open as admin for "msi" and "vbs" file types only. http://img4.imagetitan.com/img.php?i...runasadmin.gif Is it somewhere else? |
#35
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
For alt.comp.os.windows-10,alt.windows7.general Lionel Muller wrote:
How can I open the command prompt as administrator with elevated privileges without having to give up and resort to a menu based search and in the least number of mouse clicks or menu selections (using the classic menu) as possible? Here is the latest summary with all the inclusions from everyone, as my way of saying thanks and paying back the ng with something they can use. If I missed anything or made any mistakes or if you have improvements, they're always invited. Efficient Windows 10 command prompt as Admin in any desired location OVERVIEW: A. Keyboard: Windows+X,A http://img4.imagetitan.com/img.php?i...mincmd3849.gif B. Menu: Shift-Rightclick on the Windows-icon Command Prompt (Admin) http://img4.imagetitan.com/img.php?i..._admincmd3.gif C. Command: Start Run cmda http://img4.imagetitan.com/img.php?i..._admincmd2.gif D. Shortcut: Put a shortcut to open an admin command anywhere http://img4.imagetitan.com/img.php?image=16_cmda_2.gif E: Folder: {Shift}RightClick on a folder to open an Admin command here http://img4.imagetitan.com/img.php?image=16_cmda_4.gif SUGGESTIONS: A. Keyboard: Windows+X,A Note: Win+X brings up the right-click menu for the Start button. http://img4.imagetitan.com/img.php?image=16_cmda_3.gif Then A selects Command Prompt (Admin) or Windows PowerShell (Admin) depending on which version of Windows 10 you have. (Note: Win+A is the Action Center.) B. Menu: Shift-Rightclick on the Windows-icon Command Prompt (Admin) Note: Non-classic users should be able to omit the "Shift". http://img4.imagetitan.com/img.php?i..._admincmd3.gif C. Command: Start Run cmda (Needs a one-time setup: See cmda.reg & cmda.bat below.) http://img4.imagetitan.com/img.php?i..._admincmd2.gif D. Shortcut: http://img4.imagetitan.com/img.php?image=16_cmda_1.gif http://img4.imagetitan.com/img.php?image=16_cmda_2.gif Rightclick in any folder (e.g., the Desktop) New Shortcut Type a location of "cmd" (or "cmd.exe") sans quotes Click Next Type an optional name (e.g., "cmd as admin in Users with red bg") Click Finish. Rightclick the new Shortcut Properties Change the Shortcut Target from C:\Windows\System32\cmd.exe To C:\Windows\System32\cmd.exe /K "cd /d D:\Users" [Note The "/d" allows opening on other disc volumes.] Or C:\Windows\System32\cmd.exe /K "cd C:\Users" http://img4.imagetitan.com/img.php?i..._admincmd1.gif Press the Advanced button Check [x]Run as Administrator Or Windows search for the keyword "CMD". Right click on the resultant "Command Prompt - Desktop app". Select "Open file location" which brought me to a terrible location: C:\Users\x\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows System\ where you'll find a "Command Prompt" shortcut set to: Target = %windir%\system32\cmd.exe Start in = %HOMEDRIVE%%HOMEPATH% Shortcut key = not set Right drag a copy of that Command Prompt shortcut to your desktop. Right click on that "Command Prompt" & select "Run as Administrator". (Set properties as described above.) E: Folder: RightClick a folder and you'll get a Windows Powershell menu. ShiftRightClick a folder adds the option to open a cmd window here. Creating & installing an inf adds the "cmd as Admin" option to both. http://img4.imagetitan.com/img.php?image=16_cmda_4.gif See below for the file "CmdHereAsAdmin.inf". ================================================== ==================== Note that the only thing the cmda.reg does is create a new "App Paths" key named "cmda.exe" with a value pointing to your cmda.bat file. Doing this allows you to execute that file using "Start Run cmda". ***** begin cmda.reg ***** Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\App Paths\cmda.exe] @="C:\\Users\\xxx\\Desktop\\cmda.bat" ***** end cmda.reg ***** ***** begin cmda.bat ***** @ECHO OFF REM Open a new shell "Run As Administrator" REM Based on script by foxidrive on alt.msdos.batch SETLOCAL ENABLEEXTENSIONS IF NOT "%~1"=="" goto :START SET MyFile=%TEMP%\Admin.vbs" Echo Set UAC = CreateObject("Shell.Application") "%MyFile%" Echo UAC.ShellExecute "%~f0", "%cd%", "", "runas", 1 "%MyFile%" Start "" /MIN "%MyFile%" goto :EOF :START Cmd /k "CD /D "%*" & Echo Administrator: & color 4F" ***** end cmda.bat ***** Note that the inf file below adds an entry to the folder-right-click and shift-folder-right-click context menu of "CMD here as Admin". The normal folder-right-click context menu has nothing related. The normal shift-folder-right-click context menu only adds the command prompt here, but not an admin command prompt here. ***** begin CmdHereAsAdmin.inf ***** [version] signature="$CHICAGO$" [CmdHereAsAdminInstall] CopyFiles = CmdHereAsAdmin.Files.Inf AddReg = CmdHereAsAdmin.AddReg [DefaultInstall] CopyFiles = CmdHereAsAdmin.Files.Inf AddReg = CmdHereAsAdmin.AddReg [DefaultUnInstall] DelFiles = CmdHereAsAdmin.Files.Inf DelReg = CmdHereAsAdmin.DelReg [SourceDisksNames] 55="CMD Prompt Here as Administrator","",1 [SourceDisksFiles] CmdHereAsAdmin.INF=55 [DestinationDirs] CmdHereAsAdmin.Files.Inf = 17 [CmdHereAsAdmin.Files.Inf] CmdHereAsAdmin.INF [CmdHereAsAdmin.AddReg] HKLM,%UDHERE%,DisplayName,,"%CmdHereAsAdminName%" HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\CmdHereAsAdmin.inf" HKCR,Directory\Shell\runas,,,"%CmdHereAsAdminAccel %" HKCR,Directory\Shell\runas\command,,,"%11%\cmd.exe /k cd /d ""%1""" HKCR,Drive\Shell\runas,,,"%CmdHereAsAdminAccel%" HKCR,Drive\Shell\runas\command,,,"%11%\cmd.exe /k cd /d ""%1""" [CmdHereAsAdmin.DelReg] HKLM,%UDHERE% HKCR,Directory\Shell\runas HKCR,Drive\Shell\runas [Strings] CmdHereAsAdminName="CMD Prompt Here as Administrator PowerToy (Uninstall only)" CmdHereAsAdminAccel="CMD here as Admin" UDHERE="Software\Microsoft\Windows\CurrentVersion\ Uninstall\CmdHereAsAdmin" ***** end CmdHereAsAdmin.inf ***** NOTES: This can add an open admin command prompt to the rightclick menu: http://code.kliu.org/cmdopen/ WinAero Tweaker is said to have an option to add Open Admin Prompt to the context menu in Explorer but I only see it added for "msi" & "vbs" files. http://img4.imagetitan.com/img.php?i...runasadmin.gif |
#36
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
On 28/6/2017 2:00 AM, mike wrote:
What's the definition of "elevated privileges"? Same as Run As Admin. I haven't tried to get below two clicks, but powerrun will let you run as trusted installer. -- @~@ Remain silent! Drink, Blink, Stretch! Live long and prosper!! / v \ Simplicity is Beauty! /( _ )\ May the Force and farces be with you! ^ ^ (x86_64 Ubuntu 9.10) Linux 2.6.39.3 不借貸! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA): http://www.swd.gov.hk/tc/index/site_...sub_addressesa |
#37
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
On Thu, 29 Jun 2017 16:02:53 +0000 (UTC), Lionel Muller
wrote: For alt.comp.os.windows-10,alt.windows7.general B00ze wrote: You can use this: http://code.kliu.org/cmdopen/ WinAero Tweaker also has an option to add Open Admin Prompt to context menu in Explorer but the menu entry is a bit long so I prefer using Kliu's... I installed WinAero Tweaker and looked in the context menu section. All I see is the ability to add an open as admin for "msi" and "vbs" file types only. http://img4.imagetitan.com/img.php?i...runasadmin.gif Is it somewhere else? Perhaps you are not running the latest version (0.7.0.3) of Winaero Tweaker. There are two new options in the Context Menu that are not in your pictu "Add Command Prompt as Administrator to Context Menu" "Add Command Prompt to Context Menu" (There are other differences which I will not list here) |
#38
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
For alt.comp.os.windows-10,alt.windows7.general Monty wrote:
Perhaps you are not running the latest version (0.7.0.3) of Winaero Tweaker. There are two new options in the Context Menu that are not in your pictu "Add Command Prompt as Administrator to Context Menu" "Add Command Prompt to Context Menu" (There are other differences which I will not list here) Thank you for that advice. I was running WinAero Tweaker version 0.7.0.0. The new version is 0.7.0.3. http://winaero.com/download.php?view.1796 It has "Add Command Prompt as Administrator to Context Menu". http://img4.imagetitan.com/img.php?i...ro_tweaker.gif |
#39
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
For alt.comp.os.windows-10,alt.windows7.general Lionel Muller wrote:
WinAero Tweaker is said to have an option to add Open Admin Prompt to the context menu in Explorer but I only see it added for "msi" & "vbs" files. http://img4.imagetitan.com/img.php?i...runasadmin.gif For alt.comp.os.windows-10,alt.windows7.general Monty wrote: Perhaps you are not running the latest version (0.7.0.3) of Winaero Tweaker. There are two new options in the Context Menu that are not in your pictu "Add Command Prompt as Administrator to Context Menu" "Add Command Prompt to Context Menu" (There are other differences which I will not list here) Thank you for that advice. I was running WinAero Tweaker version 0.7.0.0. The new version is 0.7.0.3. http://winaero.com/download.php?view.1796 It has "Add Command Prompt as Administrator to Context Menu". http://img4.imagetitan.com/img.php?i...ro_tweaker.gif |
#40
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
On 2017-06-29 02:44, J. P. Gilliver (John) wrote:
In message , B00ze writes: On 2017-06-27 15:11, Lionel Muller wrote: [] I would like, for example, someone to suggest a method of adding an "Open Admin cmd window here" in the right-click context menu. You can use this: http://code.kliu.org/cmdopen/ [] Looks good: it is an "open command prompt here", but "can be used to open elevated command prompts." Without installing it to try, however: how does it do the admin-level prompt - is it just an extra context-menu option, or do you have to do something obscure? Kliu adds 2 options to right-click: Open Command Prompt and Open Elevated Command Prompt. So it does take-up 2 slots. But the total length of the text is less than that of WinAero, and I like a vertically thin menu. I discovered that little tool because I use Kliu's HashCheck shell extension (now hosted on GitHub) and it was on the same website. Best Regards, -- ! _\|/_ Sylvain / ! (o o) Memberavid-Suzuki-Fdn/EFF/Red+Cross/SPCA/Planetary-Society oO-( )-Oo --T-A+G-L-I+N-E--+M-E-A+S-U-R+I-N-G+--G-A+U-G-E+-----+---60^ |
#41
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
On 2017-06-29 23:29, Lionel Muller wrote:
For alt.comp.os.windows-10,alt.windows7.general Monty wrote: Perhaps you are not running the latest version (0.7.0.3) of Winaero Tweaker. There are two new options in the Context Menu that are not in your pictu "Add Command Prompt as Administrator to Context Menu" "Add Command Prompt to Context Menu" (There are other differences which I will not list here) Thank you for that advice. I was running WinAero Tweaker version 0.7.0.0. The new version is 0.7.0.3. http://winaero.com/download.php?view.1796 It has "Add Command Prompt as Administrator to Context Menu". http://img4.imagetitan.com/img.php?i...ro_tweaker.gif You can do a lot with WinAero Tweaker. When I first got it I'd done a lot already using registry edits, but one thing I had not done was to change the Windows Startup Sound, which involves loading a DLL into Resource Hacker and replacing the sound - Using WinAero Tweaker is much simpler :-) Best Regards, -- ! _\|/_ Sylvain / ! (o o) Memberavid-Suzuki-Fdn/EFF/Red+Cross/SPCA/Planetary-Society oO-( )-Oo Why doesn't the glue stick to the inside of the bottle? |
#42
|
|||
|
|||
Cmd prompt as Administrator with elevated privilages
In message , B00ze
writes: On 2017-06-29 02:44, J. P. Gilliver (John) wrote: In message , B00ze writes: [] You can use this: http://code.kliu.org/cmdopen/ [] how does it do the admin-level prompt - is it just an extra context-menu [] Kliu adds 2 options to right-click: Open Command Prompt and Open Elevated Command Prompt. So it does take-up 2 slots. But the total length of the text is less than that of WinAero, and I like a vertically thin menu. I discovered that little tool because I use Thanks for reply - I agree about menu width. [] -- J. P. Gilliver. UMRA: 1960/1985 MB++G()AL-IS-Ch++(p)Ar@T+H+Sh0!:`)DNAf All that glitters has a high refractive index. |
Thread Tools | |
Display Modes | Rate This Thread |
|
|