Home > Windows Server News > Scripting School: How do I map printers?
Windows Server News:
EMAIL THIS

Scripting School: How do I map printers?

By Christa Anderson, Contributor
11 Jul 2005 | SearchWinSystems.com

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

Mapping printers uses methods other than the one for mapping drive locations, but the basic idea is very similar.

To map a network drive, you would use the MapNetworkDrive method to Wsh.Network and supply the drive letter and path to that drive as arguments. To map a printer, use that object's AddWindowsPrinterConnection method and supply the shared printer path as an argument.

Want to make that printer the default? No problem -- first add that printer connection, then use the SetDefaultPrinter method.


Scripting School: More on connecting to network resources

  Introduction
  What happens to all those mapped drives?
  What about location-based mappings?
  How do I map printers?
  Does Select Case support wildcards?
  How to put the script together
  MapResources sample script
  Summary

Read Christa's previous columns:
Beginner's guide to scripting
It's time to increase your scripting expertise

Scripting: Connect users to network resources

ABOUT THE AUTHOR:
Christa Anderson
A Terminal Services MVP, Christa Anderson is the strategic technology manager for visionapp She formerly was program manager for the Microsoft Terminal Services team. She is an internationally known authority on scripting, the author of Windows Terminal Services, The Definitive Guide to MetaFrame XP, and co-author of the book Mastering Windows 2003 Server. If you have a scripting question for Christa, please e-mail her at editor@SearchWincomputing.com. She often uses these emails as fodder for her scripting columns.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Windows Server Management - Virtualization, Consolidation, Clustering
HomeTopicsBlogsITKnowledge ExchangeTipsNewsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts