Corrected the parameters.
How can i run program under cursor as admin?
Moderators: Hacker, petermad, Stefan2, white
Re: How can i run program under cursor as admin?
exe - work, other - doesn't
OS: Win10 | TC: latest x64
Re: How can i run program under cursor as admin?
Because it should be done via cm_CommandBrowser, not ini, where additional quotes are needed around the parameters.
Overquoting is evil! 👎
Re: How can i run program under cursor as admin?
exe - ok
bat - start HIDEN elevated cmd
ps1 - nothing
¯\_(ツ)_/¯
bat - start HIDEN elevated cmd
ps1 - nothing
¯\_(ツ)_/¯
OS: Win10 | TC: latest x64
Re: How can i run program under cursor as admin?
Maybe the problem is in the ps1 code? powershell.exe doesn't it appear in the process list?
Overquoting is evil! 👎
Re: How can i run program under cursor as admin?
just one line - Get-Process
doesn't appear
doesn't appear
OS: Win10 | TC: latest x64
Re: How can i run program under cursor as admin?
Add the line $host.ui.RawUI.ReadKey(6).ch to the end of the code and check the presence of the process in the list again.
Overquoting is evil! 👎
Re: How can i run program under cursor as admin?
I.e. as a result, everything works.
Overquoting is evil! 👎
Re: How can i run program under cursor as admin?
noop
Code: Select all
TOTALCMD#BAR#DATA
*%COMMANDER_PATH%\Utils\NirCmd\nircmd.exe execmd
"(if /i "%E"=="bat" (%V) else if /i "%E"=="cmd" (%V) else if /i "%E"=="ps1" (powershell.exe -nol -noni -nop -ex Bypass -f %V) else start "" %V)&"~$nir.exefile$" win postmsg foreground 1075 540"
%COMMANDER_PATH%\TOTALCMD64.EXE,3
nircmd
%COMMANDER_PATH%\Utils\NirCmd\
-1
Code: Select all
echo test
pause
1) exe bar cmd - run as admin
2) ps1 - powershell -ExecutionPolicy Bypass -NoExit -File %P%N
OS: Win10 | TC: latest x64
Re: How can i run program under cursor as admin?
Without flashing, but with the console displayed? And what's the point of NirCmd then?

Overquoting is evil! 👎
Re: How can i run program under cursor as admin?
okey, lets start from begging
I'm using two command:
and
first one I use on CAS+ENTER and second one on CA+S=em_psrun. They both work ok and without cmd flashing, just calling UAC.
The goal is unite then. So the question is - how do that using nircmd (or else)?

I'm using two command:
Code: Select all
[em_startelevated]
cmd=%COMMANDER_PATH%\Utils\NirCmd\nircmd.exe
param=elevate %P%N
Code: Select all
[em_psrun]
cmd=*%COMMANDER_PATH%\Utils\NirCmd\nircmd.exe
param=execmd start powershell -ExecutionPolicy Bypass -NoExit -File %P%N
The goal is unite then. So the question is - how do that using nircmd (or else)?
OS: Win10 | TC: latest x64
Re: How can i run program under cursor as admin?
Why do you need to run all files with elevated permissions? It's stupid.
And why are you still not using %AMD%?
Overquoting is evil! 👎
Re: How can i run program under cursor as admin?
actually it's pretty convenient! Ctrl+Alt+Shift+Enter = run elevated!



OS: Win10 | TC: latest x64
Re: How can i run program under cursor as admin?
ok you got me intrigued with %AMD% (wtf is this) but question can be closed, since now we had swag option and call menu for ps1
OS: Win10 | TC: latest x64