Quantcast
Channel: Security forum
Viewing all articles
Browse latest Browse all 12072

OK icacls command that should work but doesn't.

$
0
0

icacls "c:\windows\system32\spool\PRINTERS" /grant administrators:(IO)(CI)(OI)F /t 

When some of my systems go to print a PDF the spooler just locks up.  I can't control what type of PDF files are coming in as they are made by all kinds of software and so the problems begin.  I have been working on a batch file that will stop the spooler service if it hasn't already, then run the above command to grant rights to the indicated directory so that the offending files can be deleted from the spooler and restart the spooler service after that has happened.  The reason for this is that by default a user can't go in and delete the files.  I believe that I have the command correct and it used to work fine in Windows XP and Windows 7 but I can't see why it doesn't work in Windows 8. 

Here is the batch file.  Please tell me what I have wrong in it.

net stop spooler
timeout/t 3 /nobreak
icacls "c:\windows\system32\spool\PRINTERS" /grant administrators:(IO)(CI)(OI)F /t
c:
cd\windows\system32\spool\PRINTERS
Del *.s*
timeout/t 3
net start spooler
exit 


Viewing all articles
Browse latest Browse all 12072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>