Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Share All the Local Printers on a Computer?

(image) Hey, Scripting Guy! How can I write a script that will automatically share all the local printers on a computer?-- CD(image) (image) (image) Hey, CD. You know, when we redid the Hey, Scripting Guy! archive we created a new category devoted exclusively to printing. When we started to fill out the archive pages, however, we ...

How Can I Use a Script to Rename a Printer?

(image) Hey, Scripting Guy! How can I use a script to rename a printer?-- SB(image) (image) (image) Hey, SB. Well, if your printer is connected to a Windows 2000 or Windows NT 4.0 print server we have bad news for you: you can’t rename a printer using a script, at least not using the technologies included in the operating system. (There ...

How Can I Print a Test Page to a Printer?

(image) Hey, Scripting Guy! How can I print a test page to a printer?-- RR(image) (image) (image) Hey, RR. As long as you’re running Windows XP this is an easy one; that’s because the revised Win32_Printer class introduced in Windows XP includes a method called PrintTestPage. As you might expect, this means you can bind to a given ...

How Can I Map a Printer, But Only If the User Doesn’t Have a Local Printer?

(image) Hey, Scripting Guy! I’d like to have a logon script that maps a network printer for each user unless that user already has a local printer. If they have a local printer, I don’t want to add the network printer. Is that possible?-- AG(image) (image) (image) Hey, AG. Not only is that possible, but it’s actually pretty easy, ...

Hey, Scripting Guy! Is There Any Way to Determine the Default Printer On a Computer?

(image) Hey, Scripting Guy! Is there any way to determine the default printer on a computer?-- JW(image) (image) (image) Hey, JW. If you’re running Windows XP or Windows Server 2003, determining the default printer is easy. That’s because the WMI class Win32_Printer found on these versions of Windows includes a property named Default. ...