Hello everybody,
I have the following problem:
I was able to put together a shortcut for TC, which allows me to open Windows Terminal command prompt in a given folder as an admin:
Command: *"%ProgramFiles%\WindowsApps\Microsoft.WindowsTerminal_1.15.3465.0_x64__8wekyb3d8bbwe\wt.exe"
Parameters: nt -d %P
Icon file: C:\Praca\Zaloha\wallpapers\icons\Terminal.ico
Tooltip: Open WT in current folder as admin
It is working, but I have one problem: every time the app updates, the version number ("1.15.3465.0" part of the string), will change and I have to modify it after some time.
Is there any way that I can put there a path which I wouldn´t have to change after every WinTerminal update?
Help with this would be appreciated.
Thanks.
Persistent path for Open Windows Terminal in current folder as admin
Moderators: Hacker, petermad, Stefan2, white
Re: Persistent path for Open Windows Terminal in current folder as admin
Command: *%ComSpec% /q/c for /f tokens^=* %f in ('dir/a-d/b/s "%ProgramFiles%\WindowsApps\wt.exe"') do @start "" "%f" nt -d
Parameters: "%P"
Parameters: "%P"
Overquoting is evil! 👎
Re: Persistent path for Open Windows Terminal in current folder as admin
Copy and paste this on you button bar.
I added an extra backslash after %P because on my system WindowsTerminal would otherwise interpret the trailing backslash of %P together with the quote at the end as a literal quote.
Code: Select all
TOTALCMD#BAR#DATA
*"%LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe" nt -d
"%P\"
imageres.dll,263
Run WindowsTerminal as administrator
-1
Re: Persistent path for Open Windows Terminal in current folder as admin
Thank you very much!
They both work, second one is bit quicker though during opening, so I am gonna use that one.
They both work, second one is bit quicker though during opening, so I am gonna use that one.