Preventing exection
Moderators: white, Hacker, petermad, Stefan2
Preventing exection
Hello,
I already have *.exe files marked with a color, but is there a way to prevent the exe from executing if double-clicked on it (from within TC offcourse)?
Cheers!
I already have *.exe files marked with a color, but is there a way to prevent the exe from executing if double-clicked on it (from within TC offcourse)?
Cheers!
And how would you use TC to execute an executable after that modification?
Anyhow, the "normal", old way is to rename *.exe to *.ex!
A more strict way would be to utilize the TC internal "File Associations" and bind *.exe to, lets say Notepad.exe?
That will open Exe in Notepad instead of executing them. (if that will work anyhow,... I don't want to try that out )
Anyhow, the "normal", old way is to rename *.exe to *.ex!
A more strict way would be to utilize the TC internal "File Associations" and bind *.exe to, lets say Notepad.exe?
That will open Exe in Notepad instead of executing them. (if that will work anyhow,... I don't want to try that out )
- ghisler(Author)
- Site Admin
- Posts: 48113
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, you can use internal associations, but don't enter *.exe - instead, click on "Define", and choose a search option. I don't know how you have defined the color - if it's via comments, you can use the same here to define an internal association by comment. You can also use content plugins here.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
The way I adapted the color for certain executables (exe & scr) is by going to Configuration -> Optons -> [Color]Display -> Define colors by file type.ghisler(Author) wrote:Yes, you can use internal associations, but don't enter *.exe - instead, click on "Define", and choose a search option. I don't know how you have defined the color - if it's via comments, you can use the same here to define an internal association by comment. You can also use content plugins here.
Now I'm looking for a fix to temporarily disable accidental execution from within TC. I don't want to 'redefine' the Windows behaviour if you will .
I'm not a TC expert, I just use a relative few things so can you guide me through the process a bit? Such as, what content plug-in would I need? And where is this 'association comment' thing? I honestly don't know what this is. The scenario is this: when I'm off traveling, I download tons of newsgroups during my absence. When I'm back, it's time to unpack, sort, rename and so forth. Obviously there's always a lot of garbage between the stuff. I colored them so they stick out. But since it's a lot of work with so many files, it's easy accidental mis-click, if you will. Hence the need to have exe's, scr's, bat files and all those executables to do nothing.
That's a price I'm temporarily willing to pay.Stefan2 wrote:And how would you use TC to execute an executable after that modification?
Renaming all the individual exes will not do .Stefan2 wrote: Anyhow, the "normal", old way is to rename *.exe to *.ex!
I'll keep this in mind as one of the options, but I'd rather have a 'Do Nothing' result.Stefan2 wrote: A more strict way would be to utilize the TC internal "File Associations" and bind *.exe to, lets say Notepad.exe?
Everybody thanks and cheers again.
EDIT:
I tried to use the 'Internal Association' option (Total Commander Only), to point to a 'do-nothing' batchfile. But I'm allowed only to associate with exe's! So I pointed to a rundll32, which does nothing without parameters and is lightweight. However, this will only work if you re-associate non-exe files! I tested it on WMV and MP4 files, then it works great. But doesn't work on executables. Any work arounds?
Re: Preventing exection
Gameboi wrote:I already have *.exe files marked with a color, but is there a way to prevent the exe from executing if double-clicked on it (from within TC offcourse)?
I don't think so. See:ghisler(Author) wrote:Yes, you can use internal associations, but don't enter *.exe - instead, click on "Define", and choose a search option. I don't know how you have defined the color - if it's via comments, you can use the same here to define an internal association by comment. You can also use content plugins here.
ghisler(Author) wrote: ↑Indeed exe, com, bat and lnk files are treated differently than other files: The default verb cannot be overridden via internal associations...
Last edited by white on 2022-03-21, 14:40 UTC, edited 2 times in total.
Reason: fixed BBCode
Reason: fixed BBCode
With the following tool, you can convert your batchfile to an executable file, I have never tried it myself though.Gameboi wrote:EDIT:
I tried to use the 'Internal Association' option (Total Commander Only), to point to a 'do-nothing' batchfile. But I'm allowed only to associate with exe's! So I pointed to a rundll32, which does nothing without parameters and is lightweight. However, this will only work if you re-associate non-exe files! I tested it on WMV and MP4 files, then it works great. But doesn't work on executables. Any work arounds?
http://www.f2ko.de/programs.php?lang=en&pid=b2e
Hah good to know for the future. Might come in handy. Won't help me this time though. See 'White's' last answer.Henrie wrote:With the following tool, you can convert your batchfile to an executable file, I have never tried it myself though.Gameboi wrote:EDIT:
I tried to use the 'Internal Association' option (Total Commander Only), to point to a 'do-nothing' batchfile. But I'm allowed only to associate with exe's! So I pointed to a rundll32, which does nothing without parameters and is lightweight. However, this will only work if you re-associate non-exe files! I tested it on WMV and MP4 files, then it works great. But doesn't work on executables. Any work arounds?
http://www.f2ko.de/programs.php?lang=en&pid=b2e