Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Tue, 26 Aug 2008 07:01:38 +0300,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


del printer and make new printer   
Hello NG,

I will del all printers on a computer, after this I will make 2 new 
network printer on it.

Can I make that over a VBS ?

Mike
date: Tue, 26 Aug 2008 07:01:38 +0300   author:   Mike Berger

Re: del printer and make new printer   
Il giorno Tue, 26 Aug 2008 07:01:38 +0300, Mike Berger  ha scritto:

>Hello NG,
>
>I will del all printers on a computer, after this I will make 2 new 
>network printer on it.
>
>Can I make that over a VBS ?

This lists all the printers

   Set WshNetwork = WScript.CreateObject("WScript.Network")
   Set oPrinters = WshNetwork.EnumPrinterConnections
   WScript.Echo "Network printer mappings:"
   For i = 0 to oPrinters.Count - 1 Step 2
      WScript.Echo "Port " & oPrinters.Item(i) & " = " & oPrinters.Item(i+1)
   Next


This removes a printer
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.RemovePrinterConnection "LPT1:"
-- 
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
date: Fri, 29 Aug 2008 20:49:18 GMT   author:   (Reventlov)

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us