Solved

Control Windows Explorer F5 Function

Posted on 2010-08-26
11
725 Views
Last Modified: 2012-05-10
Hello Experts,

I have a real time application which we have tuned extensively to run under windows in real time under a variety of different system conditions and simultaneous with other applications.  The one application that still doesn't "play nice" with our application is Windows Explorer.  

One problem with Windows Explorer have been identified as the use of the F5 key.  The application can be made to crash if a user opens the folder where the application is creating files and presses F5 repeatedly.  

My question is - can the F5 function be disabled within the Operating System controls somewhere?  Thanks
0
Comment
Question by:markdolar
11 Comments
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33535740
I don't think you can disable it, but you can probably trap it before it reaches windows explorer.
0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 33535855
0
 
LVL 1

Assisted Solution

by:ufriends
ufriends earned 200 total points
ID: 33536384
Remapkey.exe: Remap Windows Keyboard Layout
RemapKey is a GUI tool that changes the layout of a keyboard by remapping the scan codes of the keys

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
0
 
LVL 50

Expert Comment

by:jcimarron
ID: 33536905
markdolar--Why is the F5 key being pressed repeatedly?  
Also F5 performs differently depending on whether F-Lock is on or off.
0
 

Author Comment

by:markdolar
ID: 33537381
Thank you all for your comments -

The issue is one of contention for kernel mode CPU, I believe.   I should clarify that the application I am trying to manage is Windows Explorer, not IE.  Neither application (ours or WE) involves a browser.  The F5, pressed without the F-Lock engaged, requests a screen refresh of information like last update time, file size, etc, for the files shown in the window.

Second point I should clarify is that I don't really think I have to hit F5 multiple times to get my application to fail, I just need to hit it at the right moment.   Our application is writing several files after doing some DMA transfers and if we can't update files (and file header information through the Windows file system) quickly enough, then the application can fail.  We have multiple threads in our app and I think when a certain thread is trying to do something and Windows Explorer is also trying to do something at the same time (like update a screen display), that Windows Explorer wins.  My guess is that both are trying to access file header information at the same time.  Our application is wriiting a file, so it will need to lock the header briefly, I suppose.

Key remapping is an OK option, but has limitations since this application may be running on a machine that is foreign to us.  What I am looking for is a way to disable the F5 function in Windows Explorer, since that is the only function within the program that I've found that can cause our application to fail.  

My "Nuclear Option", if you will, is to disable Windows Explorer completely.  Our application runs fine with WE not running, but some folks don't know how to navigate a Windows OS using just the task manager.  

Thanks Again
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 18

Expert Comment

by:Cluskitt
ID: 33539783
What happens, most likely, is that the file you're trying to write to is locked by windows (explorer locks files while it tries to read header information).
0
 

Author Comment

by:markdolar
ID: 33543003
I think that hypothesis is correct, but how do I prevent it short of turning off Windows Explorer?
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 33543092
The lock is usually just for a few seconds. You could:
a) Lock all the files yourself, in advance, then unlock them as you are finished.
b) Check if there's a lock on the file you're about to open. If there is, sleep for a second and try again. Once there's no lock, you can open it.

b) seems the most easy to implement, a) would be overkill (and could probably hang the user's explorer. Serves them right!! HA!!! :D)
0
 

Author Comment

by:markdolar
ID: 33549219
It is a real time process; hanging the explorer session would be ok, hanging the application not so good.

Might be worth trying to lock the files completely in our application, but I suspect the problem is more with MFT updates.   If it is contention for the MFT, then locking the files probably won't help.
0
 
LVL 18

Accepted Solution

by:
Cluskitt earned 300 total points
ID: 33549421
It's not likely to be MFT. Refresh only does a read of it, not write. Windows just locks all files in a folder when you enter/refresh, until it reads the headers of all. A good example of this is a folder full of avi/mpeg, when you have a few tag fields selected (like duration, bitrate, etc). When you enter/refresh, windows locks all files, and slowly fills in the details, unlocking as it goes.
If you try to delete a file that still has no info, it will say it's being used. If you delete it once the info is read, then you're good.

As I said, try to lock the files. Be sure to add options for when the file is already locked (possibly by F5 abuse) so you can lock it later. If that solves it, good. If not, well, it was worth a shot. :)
0
 

Author Comment

by:markdolar
ID: 33708430
thanks
0

Featured Post

Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now