refreshing the printer folder
C#
1
Posts
1
Posters
0
Views
1
Watching
-
hi all... i am trying to delete all the data in printer spooler here is my code ProcessStartInfo pns=new ProcessStartInfo("net","stop spooler"); System.Diagnostics.Process.Start(pns); string syspath=Environment.GetFolderPath(Environment.SpecialFolder.System); DirectoryInfo drdd= new System.IO.DirectoryInfo(syspath+"\\spool\\PRINTERS"); foreach(System.IO.FileInfo fin in drdd.GetFiles()) { fin.Delete(); } pns=new ProcessStartInfo("net","start spooler"); System.Diagnostics.Process.Start(pns); everything works fine .. but the problem is if we want to print again , then we have to manually go and refresh that printer folder(where the printers are listed ) how can i automate that .. thanx Akhil