Author Topic: How do I add an exception for a file without an absolute path?  (Read 1770 times)

0 Members and 1 Guest are viewing this topic.

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
How do I add an exception for a file without an absolute path?
« on: September 24, 2022, 01:53:50 AM »
Hi.

TLDR: I would like to add an exception for a file of a specific name, regardless of what its absolute path is. If I could also block access that would be even better. How do I go about this?


Longer version:

Avast Free. Windows 7 64-bit. I would like to have Avast ignore files with a fixed specific name (and maybe even size). These files don't exist on a single absolute path. It differs for every instance.

Ideal would be that these files do not get scanned, do not get deleted/quarantined, but also get blocked from opening or running. And their paths aren't fixed.

The filename is always the same, as is the size, but its location isn't. It is a text-file, but it has an .exe extension. It isn't an actual executable. If I can get Avast to ignore these files everywhere that would be good. If, just to be sure, I can also get Avast to block access if I should accidentally double-click on one; great!

Currently Avast doesn't bother the files, as they aren't real executables and don't contain malware or a virus, but it does scan them, resulting in a several second delay in me opening folders containing them for the first time. This sometimes happens dozens of times a day. It starts to add up and gets really annoying. Maybe a faster PC would fix this with brute force, but hopefully Avast can be configured to just ignore these files.

How do I go about adding an exception for a file without a fixed path?

Thanks.

Online DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 87085
  • No support PMs thanks
Re: How do I add an exception for a file without an absolute path?
« Reply #1 on: September 24, 2022, 03:12:14 AM »
Why would it be necessary for a text file to have an exe file type, for me that's just plain weird  ?
Why it would also be in multiple locations  ?

Avast should allow for the use of wildcards.
This should cover folders that contain this file *\filename.exe

As far as I'm aware there is no size element to exclusion, however why would it be needed if the above wildcard option works (for any size).
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 22.10.6038 (build 22.10.7633.734) UI 1.0.733/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
Re: How do I add an exception for a file without an absolute path?
« Reply #2 on: September 24, 2022, 04:15:40 AM »
I've added the wildcard. Hadn't thought adding it to the beginning of the path would be accepted. Thanks. It should become clear if it works pretty soon.

Size shouldn't be relevant but the idea is it could maybe be another identifier along with filename. If the size is suddenly larger it might be an actual executable and scanning it likely prudent. As in: if name = X and size = Y then ignore, else scan.

The wrong extension is indeed weird. It's a whole thing. Many folders with a unique name each have the same weird (dummy-) file in them. That's how the files themselves don't have a fixed path. The files itself aren't harmful but they do slow file explorer way down.
« Last Edit: September 24, 2022, 04:35:59 AM by Rundvleeskroket »

Online DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 87085
  • No support PMs thanks
Re: How do I add an exception for a file without an absolute path?
« Reply #3 on: September 24, 2022, 11:17:26 AM »
You're welcome.

As for adding a file size exclusion, personally I don't think it would help when you are talking about speeding things up.  Adding another variable for check Avast to check to see if it qualifies (shouldn't be scanned) I think may actually slow things down.  Avast would first have to check location exclusion before checking the file size exclusion, or it would be checking every files size first before the location exclusion.  It could be very messy and slow things down, when the whole idea is to speed things up.

I just wonder if what these dummy files are trying to achieve if it is security, what is your antivirus meant to be doing.  But since you give zero information on what the purpose is, it would be speculation at best.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 22.10.6038 (build 22.10.7633.734) UI 1.0.733/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
Re: How do I add an exception for a file without an absolute path?
« Reply #4 on: September 24, 2022, 03:29:40 PM »
Avast seems to cache hashing/crc-information or something about files so scans would be slower one time, and then it should be negligible. But if this works without any size check that's fine too. It's just that given how these files are always the exact same name and size, it could've been useful as a way of determining whether to scan or not. It would depend on if a size check is faster than an actual scan. Seems plausible. That way this file would be ignored, unless it is suddenly a different size, which is suspect, and warrants a scan when and if it is interacted with. Of course, if a virus manages to be the exact size of the text file, that would then suck. Size is 99 bytes. I'm sure it would be possible. That's why I would've liked it if Avast could block access based on filename. So scan no, block yes. Just to be sure.

I really can't go into much detail, but from what I gather the basic idea is that these dummies prevent replication of the folders in some way. Precisely because of the presence of an executable. But I need to replicate them regardless. It's silly.

Blocking a file but not scanning is a weird combination, I agree. Even though the block is just a nice to have. Haven't encountered any deviating size files yet. I wouldn't mind the scans either if they didn't slow down file browsing so much.

As for what Avast is ideally meant to do; scan it. But without the massive slowdown. If that isn't possible, it's time to get creative.
« Last Edit: September 24, 2022, 04:05:57 PM by Rundvleeskroket »

Online DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 87085
  • No support PMs thanks
Re: How do I add an exception for a file without an absolute path?
« Reply #5 on: September 24, 2022, 07:13:30 PM »
Because these files aren't actually .exe files (and obviously aren't digitally signed), I rather doubt that they would be included in the Persistent cache designed to speed up scans.  As in

Having two filters relating to one file type is always going to slow scanning as you would be doubling the overhead.  Not to mention that currently there is no such function within Avast to delimit an exclusion on a file (given two parameters for the same exclusion). 

The current Exclusion function applies to more than one area, more can be enabled, so it would be spread across multiple scan functions. So to incorporate that it would have to be compatible with all of these options.  But in all honesty I can't see Avast incorporating this given the development and functional overhead during file shield activity and the others scans that can potentially be included.

I would probably be getting not so creative and decide whether the hassle this program is causing to the potential benefit it may have.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 22.10.6038 (build 22.10.7633.734) UI 1.0.733/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
Re: How do I add an exception for a file without an absolute path?
« Reply #6 on: September 24, 2022, 08:32:15 PM »
After a folder with the file has been opened once, slowly, all times after are fast. No more delay.

Maybe it isn't Avast but Windows itself trying to read an icon for the .exe or something like that. In which case this whole thread is moot.

Online DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 87085
  • No support PMs thanks
Re: How do I add an exception for a file without an absolute path?
« Reply #7 on: September 24, 2022, 10:17:16 PM »
After a folder with the file has been opened once, slowly, all times after are fast. No more delay.

Maybe it isn't Avast but Windows itself trying to read an icon for the .exe or something like that. In which case this whole thread is moot.

1.  Hard to say for certain, but the wildcard folder file exclusion should certainly help.  What I don't know is if this would also have found its way into the persistent cache (as they aren't truly executable files).

2.  In explorer, Windows could I guess be trying to find a relevant file icon for the file type.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 22.10.6038 (build 22.10.7633.734) UI 1.0.733/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
Re: How do I add an exception for a file without an absolute path?
« Reply #8 on: September 24, 2022, 10:44:28 PM »
The thing is though that this behaviour is limited to these specific files. Other folders with executables without an icon just get a default icon, but no slowdown in opening the folder. Those are real executables however. It's possible that trying to read these files as an executable and failing takes longer. Maybe in those few seconds many retries happen until it times out.

Online DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 87085
  • No support PMs thanks
Re: How do I add an exception for a file without an absolute path?
« Reply #9 on: September 25, 2022, 02:00:47 AM »
First explorer would check for an assigned image or use a windows default image. That does take time, but ordinarily but should really be measured in milliseconds.

Not knowing the specifications of your system much of this would be speculation (this is why I have that information in my forum profile signature) as an older system with a low specification this could take longer.

Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 22.10.6038 (build 22.10.7633.734) UI 1.0.733/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
Re: How do I add an exception for a file without an absolute path?
« Reply #10 on: September 25, 2022, 02:37:11 AM »
My PC isn't the newest but it really shouldn't be the cause of this problem. Especially since if it were, it should manifest itself in many other areas. It doesn't.

It may be 10 years old at its core, but it can still get out of its own way.

CPU: 3770K @ 4.5 GHz all core.
Mem: 16 GB PC2133 CL9
GPU: 1080 Ti
Storage: MX300 750 GB for OS and programs, MX500 4 TB for data. Both SATA600 TLC drives with DRAM cache.

So, a quad core with h/t (8 logical cores) running 1 GHz over stock on all cores, plenty of fast (for its day) memory, and all SSD for storage.

Online DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 87085
  • No support PMs thanks
Re: How do I add an exception for a file without an absolute path?
« Reply #11 on: September 25, 2022, 07:41:33 AM »
Well you can see my old laptop specs in my signature and I don't see any of this, of course I don't have the same software or OS and probably usage (nor that particular program).  So I'm at a loss as to what this might be.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 22.10.6038 (build 22.10.7633.734) UI 1.0.733/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline waking

  • Jr. Member
  • **
  • Posts: 29
Re: How do I add an exception for a file without an absolute path?
« Reply #12 on: September 25, 2022, 02:33:49 PM »
The thing is though that this behaviour is limited to these specific files.

Do you see the same slowdown if you use a file manager other than
Windows File Explorer? Such as Total Commander, Multi Commander, etc.

In my experience Windows File explorer is *very* slow in many operations.

Opening a folder with 700+ mp4 files can take 20-40 secs especially
if I am scrolling the list. Or changing the sort order, etc.

Among other things, Explorer apparently examines the contents of each
file and produces summary info - which can be seen when hovering the
mouse cursor over the file in the list. Details such as File Type,
Length (run time in mins and secs), etc.

By contrast, showing and scrolling the folder contents is immediate
when using one of the utilities mentioned above.

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
Re: How do I add an exception for a file without an absolute path?
« Reply #13 on: September 26, 2022, 01:44:12 AM »
I would have to test. I only use Windows File Explorer.

Even folders with thousands of files open fast on my PC. I have all the previews/thumbnails and even folder types based on content disabled.

It really is a few seconds of just nothing before the folder will even open. This is different from a folder that opens, and then you can see all the icons appear for each file. I haven't really seen that since the XP days. I've been on SSD for my OS and programs/games since 2009!

When I encounter the next folder with one of these files, we'll know more hopefully.
« Last Edit: September 26, 2022, 01:48:53 AM by Rundvleeskroket »

Offline Rundvleeskroket

  • Sr. Member
  • ****
  • Posts: 393
Re: How do I add an exception for a file without an absolute path?
« Reply #14 on: September 26, 2022, 02:54:08 AM »
OK. So I just had a folder with the file. Even with the exception the slowdown still occurs. So maybe the problem isn't Avast? Or the exception is somehow ignored.