Forcing Windows XP to forget printer settings.

  1. Create a printer called Test, based on an NRG DSc 460, using a PCL 5c driver, on a Windows 2003 server. Share it as TestPrinter, ensuring that the Printing Defaults are set to Color.
  2. On a Windows XP machine, connect to the printer by running “\\<server>\TestPrinter”
  3. Note that the printer on the XP machine will default to Color. This is correct.
  4. Delete the printer on XP.
  5. On the server, change the Printing Defaults to Black and White.
  6. Reconnect the printer as in step 2.
  7. Note that the printer on the XP machine will default to Color. This is incorrect.

The behaviour on Windows 7 is correct (i.e. in step 7 it defaults to B&W).

What appears to be happening is that the printer settings appear to be being saved somewhere in XP. My first instinct was to search the registry for PrinterTest, and delete any related keys. This did not resolve the situation.

I then tested what happens with a different printer (a HP LaserJet 4250).  This worked correctly (i.e. it immediately pulled the new settings from the server, without needing to remove the printer), leading me to think it might be a driver issue.

I downloaded the latest driver, but how does one get rid of an existing driver? The answer is to :

  1. Open “Printers and Faxes”
  2. Right-click and select “Server Properties”
  3. Click the “Driver” tab – from here you can remove drivers
  4. If you get an error that the driver is in use, restart the “Print Spooler” service.

Once I had deleted the old driver, and installed the new one, everything was Rosie again!

EDIT: On Windows 7, the “Server Properties” option has been removed. Instead you can use Start → Run → “printmanagement.msc”.

Version Numbering in .NET

There are lots of different version numbers in a typical .NET project. This post attempts to capture them, their differences, and their usage.

Product Version

When using ClickOnce deployment, this will give you the version number the application was published as.
Location : My Project → Publish → Publish Version
Usage:

System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion

Assembly Version

The version of the file generated by your project.
Location : My Project → Application → Assembly Information… → File version:
See: MSDN Documentation
Usage:

System.Reflection.Assembly.GetExecutingAssembly().GetName.Version

File Version

This value is what is displayed on the Version tab of the Windows file properties dialog.
Location : My Project → Application → Assembly Information… → Assembly version:
See: MSDN Documentation
Usage:

CType(System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes( _
GetType(System.Reflection.AssemblyFileVersionAttribute), False).First, _
System.Reflection.AssemblyFileVersionAttribute).Version

Why does Hotmail still suck so badly?

I can live with the entirely useless spam filters. I can live with them breaking the back button on their website. I’ve even grown to like it that every time I tell someone my email address it sounds like I’m boasting (hot male? Geddit?!).

But why, when I delete an email from my phone, do I then have to log in to my Hotmail account and delete it from the website as well?

Apparently there is a partial-workaround, but I’m afraid, Hotmail, I’ve finally given up on you. You are account non grata to me now.