Windows 10: Cmd.exe powercfg -requests different when run within application

Discus and support Cmd.exe powercfg -requests different when run within application in Windows 10 Performance & Maintenance to solve the problem; I am working on creating an application that monitors and controls sleep settings. I noticed that my application prevents the computer from sleeping... Discussion in 'Windows 10 Performance & Maintenance' started by Qvene, Aug 18, 2020.

  1. Qvene Win User

    Cmd.exe powercfg -requests different when run within application


    I am working on creating an application that monitors and controls sleep settings. I noticed that my application prevents the computer from sleeping because it uses an audio stream. I attempted to create an algorithm that would find all the drivers preventing sleep using powercfg -requests and then would override those drivers using powercfg -requestsoverride "driver name". This algorithm works, however, I noticed that when running the application, the powercfg -requests returns a different result than when opening a command console and checking powercfg -requests manually.

    The first image below shows the result of powercfg -requests when I manually type it into a command window.

    Cmd.exe powercfg -requests different when run within application 1a7abe6b-3ddf-4612-b9f2-5e3ed986dbda?upload=true.png




    This second image shows the result of powercfg -requests when my application creates a command window with arguements "/c powercfg -requests"


    Cmd.exe powercfg -requests different when run within application 4f2f498a-01ca-4287-b4df-3f7bb1a0e298?upload=true.png


    Note these are both run while the application is running, but the second one is very different from the first one. Also the second one does not include the audio stream drivers. Both of these command windows have admin privileges and the application framework I am using is Unity. Can anyone explain why this happens and how can I query all of the drivers that are stopping my computer from sleeping?

    :)
     
    Qvene, Aug 18, 2020
    #1
  2. Saltgrass Win User

    powercfg -requestsoverride errors

    Did you run the command below to check your command. If the powercfg /requests shows the Realtek driver it use whatever it shows, as indicated by the listing after using the command.

    powercfg /requestsoverride /?
     
    Saltgrass, Aug 18, 2020
    #2
  3. Can't run exe file

    Hello Mike,

    I realize the inconvenience you are facing in running the .exe file. We will help you.

    To assist you better, I suggest you to answer the below questions.

    • What application are you trying to install?
    • Are you getting any error message when you try to install the application?
    • From where did you download the application?
    Please post to us with ,ore information to help you better.
     
    Sachin Venkatesh, Aug 18, 2020
    #3
  4. Nikhar_K Win User

    Cmd.exe powercfg -requests different when run within application

    Faulting application name: bad_module_info when trying to run exe installer

    Hi,



    Thank you for writing to Microsoft Community Forums.



    In order to help you with the appropriate troubleshooting steps, please reply with the following details:



    • Do you receive any error message when you run the .exe installer?
    • Which version of Windows is installed on the computer currently? To check type:
      winver in the search bar on the Taskbar and hit Enter.


    As you have mentioned that you have Kaspersky installed on the computer, it could be that Kaspersky is blocking the installers to run. I suggest you to try disabling Kaspersky and see if that helps. Please follow the steps to disable Kaspersky:



    1. Type Kaspersky in the search bar on the
      Taskbar and open it from the search results.
    2. Now, click on Settings.
    3. Click on Additional and then click on
      Self-Defense.
    4. Clear the check box for
      Enable Self-Defense to disable Kaspersky.
    5. If you receive any prompt, click on Continue.

      Note: Disabling Antivirus software may open the computer to threats. Make sure to enable it after performing the troubleshooting.


    You can also check if the application that you are trying to run is Quarantined by Kaspersky. If the application is Quarantined, restore the application and see if that helps. Please follow the steps mentioned below:



    1. Type Kaspersky in the search bar on the
      Taskbar and open it from the search results.
    2. Click on More tools.
    3. In the Tools window, click on
      Quarantine
      .
    4. Look for the .exe installer that you are trying to run. If you find the installer, right click on it and select
      Restore to restore it to its original location.


    Please reply with the status of the issue, we will be glad to help you further.



    Regards,

    Nikhar Khare

    Microsoft Community - Moderator
     
    Nikhar_K, Aug 18, 2020
    #4
Thema:

Cmd.exe powercfg -requests different when run within application

Loading...
  1. Cmd.exe powercfg -requests different when run within application - Similar Threads - Cmd exe powercfg

  2. Monitor not going to sleep - Random Framework-v4.0.30319 exe show in powercfg /requests

    in Windows 10 Gaming
    Monitor not going to sleep - Random Framework-v4.0.30319 exe show in powercfg /requests: I have managed to find out why my monitor are not going to sleep by running powercfg /requestspowercfg -requests DISPLAY: [PROCESS] \Device\HarddiskVolume3\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe SYSTEM: [PROCESS]...
  3. Monitor not going to sleep - Random Framework-v4.0.30319 exe show in powercfg /requests

    in Windows 10 Software and Apps
    Monitor not going to sleep - Random Framework-v4.0.30319 exe show in powercfg /requests: I have managed to find out why my monitor are not going to sleep by running powercfg /requestspowercfg -requests DISPLAY: [PROCESS] \Device\HarddiskVolume3\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe SYSTEM: [PROCESS]...
  4. Monitor not going to sleep - Random Framework-v4.0.30319 exe show in powercfg /requests

    in Windows 10 Drivers and Hardware
    Monitor not going to sleep - Random Framework-v4.0.30319 exe show in powercfg /requests: I have managed to find out why my monitor are not going to sleep by running powercfg /requestspowercfg -requests DISPLAY: [PROCESS] \Device\HarddiskVolume3\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe SYSTEM: [PROCESS]...
  5. How do I remove something added to powercfg -Requests Override in CMD?

    in Windows 10 Ask Insider
    How do I remove something added to powercfg -Requests Override in CMD?: I tried powercfg -Requests Override because PC didn't go to sleep. Do anyone know the command to undo this? submitted by /u/BuldozerX [link] [comments] https://www.reddit.com/r/Windows10/comments/mav0zx/how_do_i_remove_something_added_to_powercfg/
  6. cannot run an exe file in CMD administrator

    in Windows 10 Software and Apps
    cannot run an exe file in CMD administrator: From exe file property ===> check: Run this program as an administrator open cmd: run as adminitrator type cd ==> enter C:\Users\MYNAME\Downloads\Programs\Apps\Viber Setup ==> Enter ===> 'C:\Users\MYNAME' is not recognized as an internal or external command, operable...
  7. cannot run an exe file in CMD asministrator

    in Windows 10 Software and Apps
    cannot run an exe file in CMD asministrator: From exe file property ===> check: Run this program as an administrator open cmd: run as adminitrator type cd ==> enter C:\Users\MYNAME\Downloads\Programs\Apps\Viber Setup ==> Enter ===> 'C:\Users\MYNAME' is not recognized as an internal or external command, operable...
  8. 1000 CMD OPENING WHEN RUNNING ANY APPLICATION

    in AntiVirus, Firewalls and System Security
    1000 CMD OPENING WHEN RUNNING ANY APPLICATION: Hello,i am stucked at a problem where i run anything some or unlimited cmd's opens with the location of Documents folder or System 32.I think it's a virus but i have 3 antivirus installed but unfortunately that dosen't worked and also a notepad opened and has a commanbd like...
  9. Cmd.exe 'powercfg -requests' different result when run within application

    in Windows 10 Performance & Maintenance
    Cmd.exe 'powercfg -requests' different result when run within application: I am working on creating an application that monitors and controls sleep settings. I noticed that my application prevents the computer from sleeping because it uses an audio stream. I attempted to create an algorithm that would find all the drivers preventing sleep using...
  10. Cannot run .exe files, cmd (admin)

    in Windows 10 BSOD Crashes and Debugging
    Cannot run .exe files, cmd (admin): Hi! I tried to install a program to recover some lost pictures from an android phone. Later on some error popped up basically saying I couldn’t install the program. I’ve since then deleted the installer exe file. For some reason nothing was working so i force shutdown my...