Last active
February 13, 2025 13:42
-
-
Save Sopor/57f21eaa12be62b3592b0fdcf2477799 to your computer and use it in GitHub Desktop.
Total Commander - Open command prompt window as Administrator without showing that annoying UAC warning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL | |
if /i %1==scheduler goto SCHEDULER | |
echo %1 >%TEMP%\tcelevatedcmd.tmp | |
"%SystemRoot%\System32\schtasks.exe" /run /tn "TotalCMDRunAdm" | |
goto END | |
:SCHEDULER | |
set /P startcmdpath=<%TEMP%\tcelevatedcmd.tmp | |
"%APPDATA%\GHISLER\Command_Prompt.lnk" /K cd /d "%startcmdpath%" | |
:END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools
in the left window of Total Commander.%APPDATA%\Roaming\GHISLER
in the right window of Total Commander.Expand to view picture
Raw
and save it astotalcmdadm.cmd
(or click on Download ZIP and extract the file) in%APPDATA%\Roaming\GHISLER
(the right window).Command Prompt.lnk
from the left window to the right and at the same time rename the file toCommand_Prompt.lnk
.Properties
on theCommand_Prompt.lnk
in the right window.Expand to view picture
Advanced
and enableRun as administrator
and clickOK
andOK
again to close properties.Expand to view picture
Total Commander
or add it inusercmd.ini
(creating a button is much easier).Expand to view picture
Task Scheduler
by openRun
(Winkey+R) and type intaskschd.msc
and pressENTER
.Navigate to
Task Scheduler
and expand it and right click onTask Scheduler Library
andCreate Task
.Expand to view picture
Name
, checkRun with highest privileges
,Hidden
and change toWindows 10
.Expand to view picture
Action
and clickNew...
, type in the path to the batch file and typescheduler
as arguments.Expand to view picture
Conditions
and set it as the picture below.Expand to view picture
Settings
and set it as the picture below.Expand to view picture
Press
OK
to save it!You should now be able to open a command prompt window as Administrator in current directory without that annoying UAC warning by clicking on the button you have created in the button bar of Total Commander...
NOTE: This will not work if you are remotely connected to the computer over RDP!