Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. refreshing the printer folder

refreshing the printer folder

Scheduled Pinned Locked Moved C#
helpquestionworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AnnnS
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups