LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I hibernate PC through LabVIEW?

Solved!
Go to solution

Hello

I want to provide hibernate option in my VI which is running on Windows Embedded Standard 7 operationg system.

So please suggest me the feasible solutions If any.

0 Kudos
Message 1 of 5
(3,094 Views)

Use System Exe.vi in LabVIEW to call the command  Powercfg-h on

Make sure you run this command as admin.

This example shows how to programmatic use command prompt with System Exe.vi, although it is used to invoke windows volume control so changes will be required for your app. 

*************************************************
CLD
*************************************************
0 Kudos
Message 2 of 5
(3,087 Views)
Solution
Accepted by topic author LV_Usr

For the complete commands that will be required to hibernate see here.

*************************************************
CLD
*************************************************
Message 3 of 5
(3,083 Views)

Thank you Dear!!!

It's working well.

0 Kudos
Message 4 of 5
(3,065 Views)

Hi Devang Gandhi,

 

There are a couple more ways to do it: you can use a .NET invoke node to call Application::SetSuspendState or use a call library function node to call the SetSuspendState method directly (though the latter may require enabling the SE_SHUTDOWN_NAME privilege).

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 5 of 5
(3,010 Views)