Thank you MVV, this is nifty. I take it into my tool box.
Code: Select all
TOTALCMD#BAR#DATA
%Commander_PATH%\Tool\CMDs\Sudo.exe
?%P%N
%Commander_PATH%\TOTALCMD.EXE,10
Sudo run App As Admin
-1
---
To launch an DOS-Box with Admin-rights i launch this batch from an button:
RunAsADMIN.cmd
Code: Select all
@Echo off && Title Launch console as ADMIN && COLOR 1F
RUNAS /USER:Administrator "cmd /T:4F /K TITLE ADMIN RIGHTS" && "/K /F:ON /E:ON"
or more simple:
@ECHO OFF
runas /user:administrator cmd
To run TC with Admin-rights start this batch from an button:
RunTCAsADMIN.cmd
Code: Select all
@Echo off && Title Launch console as ADMIN && COLOR 1F
RUNAS /USER:Administrator "%Commander_PATH%\TOTALCMD.EXE"
General use:
runas /user:Administrator "yourTool"
F.ex. to run WinExplorer with admin rights
start iExplorer with admin rights first and type C: into the address bar:
runas /user:Administrator "%ProgramFiles%\Internet Explorer\iexplore"
To launch the pointed/selected program as admin:
RunPointedAsADMIN.cmd
Code: Select all
REM RunPointedAsADMIN.cmd
@Echo off && Title Launch console as ADMIN && COLOR 1F
RUNAS /USER:Administrator "%1"
GOTO EOF
----8<---------8<----- TC button ----8<---------8<-----
TOTALCMD#BAR#DATA
%Commander_PATH%\TOOL\CMDs\RunPointedAsADMIN.cmd
%P%N
%Commander_PATH%\TOTALCMD.EXE
RunPointedAsADMIN run App as Admin
-1
----8<---------8<---------8<---------8<---------8<-----
:EOF
To launch a DOS-Box with System-rights:
RunAsSys.cmd
Code: Select all
@Echo off && Title Launch console as ADMIN && COLOR 1F
RUNAS /USER:Administrator "SysRun.exe cmd.exe /T:4F /K TITLE System RIGHTS"
REM RUNAS /USER:Administrator "SysRun yourTool"
REM benötigt SysRun 1.3 von Brian Friesen Copyright © 2003
REM http://users.csc.calpoly.edu/~bfriesen/software/
Note:
to run cmd box as system there are also
PowerPrompt from
http://GrubleTrang.com
supershell from
http://www.p-nand-q.com/download/supershell.html
(must be launched with admin rights)
You will always be asked for the Admin password! Works for me on XP.
Post 123