Posts

Showing posts from June, 2007

Windows Scripting: Adding/removing network printers and drives

While I normally make posts related to web development, I may occasionally post something that isn't used in web development, but still has some kind of relationship (normally the underlying technology used) - for example: VBScript - Set Homepage (MSIE) / Add Notepad to Send To . In this case, it is VB Scripting and is an example of how to perform several common tasks (related to printers and drives) that network/server administrators may want to do, through a simple script (could be via login script, or executed directly on the client) rather than using the Windows GUI. It also demonstrates how to do basic error handling. Just take the following code (tweak as needed) and paste it in a script file (e.g. login.vbs). Only been tested in Windows XP (for Windows 98, you have to also define the driver name as a second parameter for AddWindowsPrinterConnection , it should work as is in Windows 2000). Option Explicit Dim WSHNetwork Dim WSHShell On Error Resume Next Set WSHNetwork = C

Link: HTML Entity Character Lookup

HTML Entity Character Lookup is a useful web based tool for looking up HTML entities codes for characters that you have an idea what they look like (e.g. a 'c'), but not sure what the entity code (e.g © for ©) to use is.