tcmd F4 run notepad++ as administrator
Moderators: white, Hacker, petermad, Stefan2
tcmd F4 run notepad++ as administrator
Hi, I want to run notepad++ as administrator by pressing F4 key (edit file), so I did:
1. notepad++.exe - properties - Compatibility- Privilege Level - Run this program as administrator
2. totalcomander - COnfiguration - Options - view and editing - set path for editor c:\prog\notepad++\notepad++.exe
But totalcommander write "File was not found. c:\prog\notepad++\notepad++.exe"
What can I do to run it??
Thanks!
1. notepad++.exe - properties - Compatibility- Privilege Level - Run this program as administrator
2. totalcomander - COnfiguration - Options - view and editing - set path for editor c:\prog\notepad++\notepad++.exe
But totalcommander write "File was not found. c:\prog\notepad++\notepad++.exe"
What can I do to run it??
Thanks!
This looks more like an error and applies to applications that are set with "Comparetool=" or "Editor=" in wincmd.ini.
If they are configured to run with admin privileges and TC itself is not, the mentioned error occurs. But they work, if both TC and the tools have the same level of privileges - if both (or none of them) are running as admin.
If they are configured to run with admin privileges and TC itself is not, the mentioned error occurs. But they work, if both TC and the tools have the same level of privileges - if both (or none of them) are running as admin.
Windows 7 Pro x64, Windows 10 Pro x64
lebede,
You can use my Sudo tool (link in signature, put it into TC dir), just enter following editor path:
You don't need to set notepad's compatibility in such case.
You can use my Sudo tool (link in signature, put it into TC dir), just enter following editor path:
Code: Select all
"%COMMANDER_PATH%\Sudo.exe" "c:\prog\notepad++\notepad++.exe" "%1"
- ghisler(Author)
- Site Admin
- Posts: 48232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
This doesn't work because TC uses WinExec to start the editor. Unfortunately WinExec does not support elevation, only ShellExecute(Ex) does.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Any solution to this one? I have the same problem if i want to use Editor=""%COMMANDER_PATH%\UTILITY\Crimson Editor Portable\cedt-286-portable\cedt.exe" "%1"" in WINCMD.INIghisler(Author) wrote:This doesn't work because TC uses WinExec to start the editor. Unfortunately WinExec does not support elevation, only ShellExecute(Ex) does.
Hi MVV,MVV wrote:Luzie,
Use my Sudo tool, it works in such case.
thanks for your reply/suggestion. I tried your SUDO yesterday (before posting here) and today, but this not fixes my problem (or I made somehting wrong).
However I found a solution while testing:
I linked a Batch-File in WINCMD.INI with setting:
Code: Select all
"Editor=""%COMMANDER_PATH%\BATCH\F4EDITOR.BAT" "%1""
Code: Select all
"%COMMANDER_PATH%\UTILITY\Crimson Editor Portable\cedt-286-portable\cedt.exe" %1
OK. My problem was the other way round: I start TC as Admin and then starting Editor with F4 works. But when I start TC without Adminrights, then Editor via F4 don´t work and it raises only Error-Message for wrong link. With the way I discovered yesterday (starting Editor from Batch) it work with and without Admin-Rights.MVV wrote:I've tried to set up administrator rights for an app and TC was able to start it via Sudo as an editor...
Luzie wrote:... I have the same problem if i want to use Editor=""%COMMANDER_PATH%\UTILITY\Crimson Editor Portable\cedt-286-portable\cedt.exe" "%1"" in WINCMD.INIghisler(Author) wrote:This doesn't work because TC uses WinExec to start the editor. Unfortunately WinExec does not support elevation...
There's no need for a separate .bat file if cmd.exe is used to start the editor:Luzie wrote:... I found a solution while testing:
...
and this F4EDITOR.BAT opens my Editor and File.
http://ghisler.ch/board/viewtopic.php?p=328408#328408
Since Sudo doesn't have the documentation, I suggest to add similar example of Sudo usage either to program's Totalcmd.net page or as a built-in help shown after calling the sudo with /? or -help parameter.MVV wrote:You can use my Sudo tool (link in signature, put it into TC dir), just enter following editor path:Code: Select all
"%COMMANDER_PATH%\Sudo.exe" "c:\prog\notepad++\notepad++.exe" "%1"
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708