I'm currently writing a small system tray app that needs to shutdown my PC at a certain time. That bit's easy:

Process.Start("shutdown", "-s -t 00")

But how do I do this when my PC is locked? The above doesn't work and I don't want to leave my PC unlocked and unattended.

I'm currently writing a small system tray app that needs to shutdown my PC at a certain time. That bit's easy:

Process.Start("shutdown", "-s -t 00")

But how do I do this when my PC is locked? The above doesn't work and I don't want to leave my PC unlocked and unattended.

What no-one knows?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.