Home > Computers and Internet > What makes a bad program (and something Windows can do about it)

What makes a bad program (and something Windows can do about it)

In a conversation I had a while ago somebody mentioned the aspects of a bad or malicious program. One of the aspects being that the application messes with other applications resources; namely files and registry keys. Do we all agree that a if an application messes with another applications files that it’s a bad, and potentionally malicious program? Good. Two types of programs are brought to mind which have this aspect are: Content Indexers and Anti Virus’s.
My personal opinion are that Content Indexers are good, but Anti Virus’s are worse than the virus’s. But both of these applications are designed to not interfere with "good" programs. Anti Virus’s do interfere though. I’ve had to write a lot of "fixes" to code where the code is trying to do something to a file which was recently modified, but once in a while it can’t. Why can’t it? Because the AV is scanning the recently modified file and has an exclusive lock on the file. This will really trip up a program because it goes to open the file and receives an exception that it can’t. In my opinion the best thing to do would be to get rid of AV’s, but that’s not going to happen; plus CI’s could cause the same problem.
So how could Windows change to help applications given that these two "bad" types of programs aren’t going to go away? Windows could have the methods which open file handles to have wait timeouts. In my situation where my application writes out a new temp file and then reads from it, it’s okay for wait for the file handle to become available. It makes my code look a lot better calling a WaitToOpenFile method, than writing a loop around every call to FileOpen.
So, what can I do to get Windows to add this to thier API?
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: