Based on this tool, I have created an automation tool https://github.com/ldtp/winldtp you can write tests in Python scripting language. API's are compatible with http://ldtp.freedesktop.org/wiki/ which works on Linux / Solaris platform. This can
be extended to other scripting language or loaded into your project.
Microsoft have done a great job, without this library its not possible. Have verified this test's on Windows XP SP3/ Windows 7 SP1/ Windows 8 development version.
To test the setup you can http://download.freedesktop.org/ldtp/winldtp-latest/WinLDTP.msi