Thanks Guys.

Works fine if I run it from the registry.