Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When I

using (var process = new Process
{
    StartInfo = new ProcessStartInfo
    {
         FileName = "powercfg.exe",
         Arguments = "-energy",
         RedirectStandardOutput = true,
         UseShellExecute = false,
    }
})
{
    process.Start();
    process.WaitForExit();
}

It outputs:

A biblioteca de Diagnóstico de Eficiência de Consumo de Energia (energy.dll) n?o p?de ser carregada.

Translated to English:

The Energy Consumption Efficiency Diagnostic library (energy.dll) couldn't be loaded.

Even when running as admin.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
528 views
Welcome To Ask or Share your Answers For Others

1 Answer

Set the WorkingDirectory to the path energy.dll and powercfg.exe is located.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...