AVI Delete Fix

Discussion in 'Windows Desktop Systems' started by lion7718, Nov 19, 2002.

  1. lion7718

    lion7718 OSNN Addict

    Messages:
    80
    I haven't been here in a while, but I'll post this for those that need it. I had this problem with AVIs last week & now it seems like it is spreading quickly. You can't move them or delete them,
    they say that they are in use, Here is my original post that I made at UTC and a fix a user named LPDad came up with:


    Here is my original post that started all this:

    Problem Moving & Deleting Movies Lets see if I can explain this right.
    If I download a Movie, my computer will not let me move it to another folder or delete it. It says it is being used by another program...this is not true.
    If I copy & paste the movie I can put it in another folder.
    But I get the same problem there...I cannot delete the damn movie...I have to delete the whole folder to get rid of it.
    Than I just create a new folder with the same name and start over again. This is a pain in the ass for sure.
    It only happens with DivX type movies....that work, if I don't get a video, just sound, I can delete it.
    Also, when I click on one of these movies, not even to play, just highlite it....
    my CPU shoots up to 100% untill I close the folder, sometimes it makes me reboot because it will stay at 100%.
    I use XP Home if this helps.

    Fix:

    The obnoxious bug in XP that causes Explorer to read the entire contents of broken AVI files before allowing any access to them is caused by bad behavior of shmedia.dll.

    This problem manifests itself by causing Explorer to read the entire contents of an AVI file, regarless of its size or location any time the mouse pointer is hovered over it, or an attempt is made to access it in windows explorer. This causes 'permission denied' errors when trying to simply move, copy or delete these files as they cannot be changed while Explorer has an open handle on them.

    This also causes a DoS situation where large AVI's are stored on remote shares and Explorer keeps reading the files from beginning to end each time they are accessed.

    To correct this misbehavior in Windows XP, remove the following registry key.

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{87D62D94-71B3-4b9a-9489-5FE6850DC73E}\InProcServer32

    This will prevent Explorer from loading shmedia.dll in response to file property queries on these files. This will not effect your ability to play files, get file attributes, or even view thumbnails. Say goodbye to all explorer.exe 100% CPU issues.

    And Solution #2 (basically does the same thing, except you are inactivating the file attributes option)...But it WORKS--No more locked .avi files:

    Well windows seem to have a REALLY big problem when it comes to reading AVI files. It seems that when you click on an AVI file in explorer, it'll try to read the entire AVI file to determine the width,height, etc. of the AVI file (this is displayed in the Properties window). Now the problem with Windows is that if you have a broken/not fully downloaded AVI file that doesnt contain this info, Windows will scan the entire AVI file trying to figure out all these properties which in the process will probably cause 100% CPU usage and heavy memory usage.

    To solve this problem all you have to do is the following:

    1. Open up regedit
    2. Goto HKEY_CLASSES_ROOT\SystemFileAs
    sociations\.avi\shellex\PropertyHandler
    3. Delete the "Default" value which should be "{87D62D94-71B3-4b9a-9489-5FE6850DC73E}"

    Voila! Please note that this will no longer provide you with the windows properties displaying the AVI file information such as width, height, bitrate etc. But its a small price to pay for saving you resources.

    I hope this will help someone out as it did for us.
    This is a XP problem only.
     
  2. Burpster

    Burpster Guest

  3. lion7718

    lion7718 OSNN Addict

    Messages:
    80
    LPDad found that also, but that will only help delete the file...
    it won't with the CPU problem.
    But I am glad you already knew that there was a problem.
     
  4. elkinm

    elkinm Guest

    This is a good fix for avi files. But I believe this problem holds for many other file types other then avi, like mpeg. Any large and some small files even mp3s seem to spend a lot of time of just loading in explorer when opening that folder. I could understand loading the right icons, but when a file type has one icon why not just load it. Either for icons or something else, explorer seems to alway scan the disk for file information.

    Is there a universal fix like the one for avis that would work for all files such that they would not be accessed by default?

    Thanks
     
  5. elkinm

    elkinm Guest

    I did the first tweak only and now I can't get the details of avi files. Usualy when I check the properties there is a details tab saying the codec and data rate of the file. I assume this information to be file atributes. Would fix #1 cause this problem or is it something else.

    Thanks
     
  6. Hipster Doofus

    Hipster Doofus Good grief Charlie Brown

    Messages:
    5,920
    Location:
    Melbourne Australia
    Looks like it has. Hope you backed the registry up before making changes. There is a tip going around where you don't have to mess with the registry to delete those files.

    This one>
    Deleting files - Access Denied Error

    Explorer.exe in XP has a bad habit of wanting to hang on to files, even when you have finished using them - therefore when you try to delete the file, XP will say "Access Denied".
    This error occurs more often when working with media files - mp3, avi, mpeg etc.
    TIP:
    Close all open applications.
    Open a command prompt and navigate to the directory with the offending files.
    Then open the Task Manager and click on the Processes tab. select "explorer.exe" under Image Name. Click "End Process".
    That will leave you with only the command prompt and the task manager running.
    Now at the Command Prompt, its time to delete the file(s). Using the DEL command. Example c:>\movies\DEL movie.avi
    Now the files are deleted, go to the task manager and click on the Applications tab. Click the "New Task" button. in the dialog, type explorer.exe and click OK.


    For folders the command is 'rd'.

    As for the other issue you mentioned try this>
    When you highlight a image or video file, explorer tries to make a preview for you in the left window pane. Well some video files are > 700mb and this bogs down explorer, so if you try to rename it/move it, etc, explorer is tying up the file b/c it can't generate a preview fast enough. The mentioned registry fix disables the preview thus enabling normal file changes to these large video files.


    Open regedit and go to :

    HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\shellex\PropertyHandler

    Delete the value you find there.


    BACKUP FIRST! :)
     
  7. elkinm

    elkinm Guest

    Yes, I restored the registry entry and the details are back. I so use the details often and would like to keep them. I also suffer from the 100% usage bug.

    Is there maybee a way to disable the scaning or preview features or maybee force a timeout for avi file accesses to at least limit the problem and still let me keep the details feature. If not, is there a third party program that can provide me with detailed information about a file, like the compression codecs and quality of compression. The windows details are quite limited so if I can find an alternative, I vould quickly give up the details tab.

    Thanks for you help.