What would be the correct way to shutdown a users computer from my application? Can you provide a way that will work for all versions of windows?

Thanks