Mobile Computing
Find in

Your IP Address is 38.107.191.92
"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives." -- William A.Foster
    Sat 11 of Sept., 2010 06:18 EST
Home   
Live Support   
Search   
Wiki >>   
Forums >>   
List Blogs
Blog: dave
Created by David Smith557 points  on Wed 12 of March, 2008 10:13 EST
Last post Wed 12 of March, 2008 10:13 EST
(1 Posts | 319 Visits | Activity=2.00)
Find:

Posted by David Smith557 points  on Wed 12 of March, 2008 10:13 EST
em Printer Mapping Script
rem printers.vbs

Const NetworkMapped? = "\\"
On Error Resume Next

Set objNetwork = CreateObject("WScript.Network")

Set colPrinters = objNetwork.EnumPrinterConnections
For i = 0 to colPrinters.Count -1 Step 2
strPrinterName = colPrinters.Item(i)
strPrinterUNC = colPrinters.Item (i + 1)
If Left(strPrinterUNC,2) = NetworkMapped? Then
objNetwork.RemovePrinterConnection(strPrinterUNC)
Next

'And now to map the required printers
'Capture the Computer name, take the first 5 characters to determine
the classroom
'Then map the relevant printers for that classroom

strComputerName = Left(objNetwork.ComputerName, 5)
Select Case strComputerName
Case "DAVID"
objNetwork.AddWindowsPrinterConnection "\\saturn\colour"
objNetwork.SetDefaultPrinter "\\saturn\colour"

End Select

Permalink 0 comments Print Email This Post
Page: 1/1

Login

Login as…


[ Register | I forgot my pass ]

Most read topics

  1. Medical Software: Optus Messenger and Windows 2003 srv
  2. Medical Software: Dentrix - Win XP - Patient Records Slow
  3. Medical Software: MDW2 backup script
  4. Medical Software: Totalcare (on SQLBase) unload / reload
  5. Medical Software: HCN SQL Mechanic
  6. Medical Software: Dentrix
  7. Web: Frames (if you must)
  8. Medical Software: HCN OSQL Restore
  9. Medical Software: PS MSI Installer error
  10. Medical Software: MDW2 backup script

Top articles

  1. Your practice security
  2. Medical Director 3 - first impressions
  3. Secure Clinical Messaging – time to start doing it!
  4. Ready to upgrade to Vista - not!
  5. Planning for a Computer or Network Installation
  6. Still using Outlook Express?
  7. Welcome to Mobile Computing
  8. IT Service Contracts
  9. Secure Shell File System
  10. Do you have a disaster recovery plan?
RSS feed Wiki RSS feed Articles RSS feed Forums
Powered by TikiWiki CMS/Groupware
[ Execution time: 0.26 secs ]   [ Memory usage: 12.48MB ]   [ GZIP Disabled ]   [ Server load: 0.00 ]
Wiki Home      
Last Changes      
Dump      
Rankings      
List pages      
Orphan pages      
Sandbox      
Categories      
Structures      
Articles home      
List articles      
List blogs      
Rankings      
List forums      
Rankings