Preventing exection

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Preventing exection

Post by *Gameboi »

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!
User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

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 :wink: )


 
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48113
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Post by *Gameboi »

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.
The way I adapted the color for certain executables (exe & scr) is by going to Configuration -> Optons -> [Color]Display -> Define colors by file type.
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 :D .

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.
Stefan2 wrote:And how would you use TC to execute an executable after that modification?
That's a price I'm temporarily willing to pay.
Stefan2 wrote: Anyhow, the "normal", old way is to rename *.exe to *.ex!
Renaming all the individual exes will not do :).
Stefan2 wrote: A more strict way would be to utilize the TC internal "File Associations" and bind *.exe to, lets say Notepad.exe?
I'll keep this in mind as one of the options, but I'd rather have a 'Do Nothing' result.

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?
User avatar
white
Power Member
Power Member
Posts: 4631
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Preventing exection

Post by *white »

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)?
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.
I don't think so. See:
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
User avatar
Hacker
Moderator
Moderator
Posts: 13073
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Gameboi,
wincmd.ini
[Configuration]
RestrictInterface=128
:?:

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Post by *Gameboi »

Hacker wrote:Gameboi,
wincmd.ini
[Configuration]
RestrictInterface=128
:?:

Roman
Nah. I should be able to open files. But thanks for help me think.
Henrie
Member
Member
Posts: 194
Joined: 2006-09-03, 23:12 UTC
Location: Volkel, the Netherlands

Post by *Henrie »

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?
With the following tool, you can convert your batchfile to an executable file, I have never tried it myself though.
http://www.f2ko.de/programs.php?lang=en&pid=b2e
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Post by *Gameboi »

Henrie wrote:
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?
With the following tool, you can convert your batchfile to an executable file, I have never tried it myself though.
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.
Post Reply