I cannot delete a particular file Access Denied


  1. Posts : 605
    W7 Ultimate
       #1

    I cannot delete a particular file Access Denied


    I am tryiong to save, delete or overwrite the file "Clear Print Spooler.bat" in C;\windows\system32 and in each case get "ACCESS Denied" error. I have tried the above in the command window with admin. priviledge. Same error.

    I had added a line that contained the word "Runas". Now I try to remove that line and save the file and get the error. On my other computer which the bat file has not been altered I can edit,save,copy move,delete and overwrite without the error. I think if I can edit the file to remove the extra line and then save it, I could remove the error.
    Bill
      My Computer


  2. Posts : 540
    Windows 7 Ultimate 64bit
       #2

    What all have you tried so far? Will it let you change the file type to .txt ? How about making a 2nd bat file but give it the same name, (make it in a different folder) then copy it to where the bad one is? (win7 should try to overwrite the old with the new .bat file.
      My Computer


  3. Posts : 10,485
    W7 Pro SP1 64bit
       #3

    Files in that folder are usually owned by a Windows account named Trusted Installer. If some application installed that batch file into that location, then maybe it should stay there. If you put it there, then take ownership of the file and move it to another location - maybe the public desktop.

    If you must leave it in that folder, then you can still take ownership of the file so that you can edit it.
      My Computer


  4. Posts : 605
    W7 Ultimate
    Thread Starter
       #4

    This problem was on another computer, so this is what I did using the suggestions you guys provided.
    I change folder/file options so that the extension was available. and changed the extension to txt.
    I then deleted the file.
    On my computer I changed the extension to txt and copied the file to a flash drive. Changed the extension on my computer back to bat.
    On the other computer I copied the file from the flash drive to the system32 folder.
    I took ownership of the file and changed it back to bat.
    I then made a shortcut and placed the shortcut on the desk top.Original problem solved.

    One problem remains,
    The shortcut I place on the desktop is in several non-administrative user accounts. When they use the shortcut to clear the print spooler they run it as the administrator and then have to use my password.
    Understandingly, I am reluctant to give up my password. Anyway out of this?
    Bill
      My Computer


  5. Posts : 10,485
    W7 Pro SP1 64bit
       #5

    I don't have a solution for the admin password issue, but I would like to ask why your users have to clear the printer cache so often that you felt the need to create/deploy this batch file? Just wondering?
      My Computer


  6. Posts : 605
    W7 Ultimate
    Thread Starter
       #6

    The reason I need this is that I am maintaining this computer in an Assisted Living Facility and although I have several user accounts that are password protected I have one account for general use of any resident. The general use account is the one that piles up print jobs in the printer spooler. Apparently those users keep trying to print when the printer is off, out of paper or has some kind of error. Then another user comes along, corrects the printer problem and then tries to print a document. Because the spooler already has jobs ahead of them they must print multiple times before their print job is printed. Ergo,the clear spooler command.
    Bill
      My Computer


  7. Posts : 10,485
    W7 Pro SP1 64bit
       #7

    Is the general use account a standard user or the Windows Guest account?

    There are a few things that I would like to test before I mention them.

    If I don't post something in a day or two - send me a PM or bump this thread.
      My Computer


  8. Posts : 10,485
    W7 Pro SP1 64bit
       #8

    I've run out of things to try - nothing worked for me :-(

    Maybe other forum members have an idea.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:49.
Find Us