레지스트리나 명령줄을 통해 전원 옵션을 변경하는 방법은 무엇입니까?

레지스트리나 명령줄을 통해 전원 옵션을 변경하는 방법은 무엇입니까?

powercfg.cpl레지스트리를 통해 "전원 옵션"을 직접 변경하고 싶습니다 .

특히 이것을 변경하고 싶습니다.

여기에 이미지 설명을 입력하세요

다음 설정에:

여기에 이미지 설명을 입력하세요

교류 전원으로 데스크톱 컴퓨터를 사용하고 있으므로 절전이 불필요하고 성능이 저하됩니다. BIOS에서 빠른 부팅을 비활성화했습니다.

이 레지스트리 키를 다음 위치에서 열었습니다 regedit.exe.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power

그리고 제가 열쇠 안에서 알아낼 수 있는 유일한 것은 다음과 같습니다:

HiberFileSizePercent REG_DWORD 0
HibernateEnabled REG_DWORD 0
HibernateEnabledDefault REG_DWORD 1

사용하려고 했더니 powercfg.exe다음과 같은 결과가 나왔습니다.

C:\Windows\system32>powercfg /l

Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance) *
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a  (Power saver)

C:\Windows\system32>powercfg /q
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c  (High performance)
  GUID Alias: SCHEME_MIN
  Subgroup GUID: 0012ee47-9041-4b5d-9b77-535fba8b1442  (Hard disk)
    GUID Alias: SUB_DISK
    Power Setting GUID: 6738e2c4-e8a5-4a42-b16a-e040e769756e  (Turn off hard disk after)
      GUID Alias: DISKIDLE
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x000004b0

  Subgroup GUID: 02f815b5-a5cf-4c84-bf20-649d1f75d3d8  (Internet Explorer)
    Power Setting GUID: 4c793e7d-a264-42e1-87d3-7a0d2f523ccd  (JavaScript Timer Frequency)
      Possible Setting Index: 000
      Possible Setting Friendly Name: Maximum Power Savings
      Possible Setting Index: 001
      Possible Setting Friendly Name: Maximum Performance
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

  Subgroup GUID: 0d7dbae2-4294-402a-ba8e-26777e8488cd  (Desktop background settings)
    Power Setting GUID: 309dce9b-bef4-4119-9921-a851fb12f0f4  (Slide show)
      Possible Setting Index: 000
      Possible Setting Friendly Name: Available
      Possible Setting Index: 001
      Possible Setting Friendly Name: Paused
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

  Subgroup GUID: 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1  (Wireless Adapter Settings)
    Power Setting GUID: 12bbebe6-58d6-4636-95bb-3217ef867c1a  (Power Saving Mode)
      Possible Setting Index: 000
      Possible Setting Friendly Name: Maximum Performance
      Possible Setting Index: 001
      Possible Setting Friendly Name: Low Power Saving
      Possible Setting Index: 002
      Possible Setting Friendly Name: Medium Power Saving
      Possible Setting Index: 003
      Possible Setting Friendly Name: Maximum Power Saving
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

  Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20  (Sleep)
    GUID Alias: SUB_SLEEP
    Power Setting GUID: 29f6c1db-86da-48c5-9fdb-f2b67b1f44da  (Sleep after)
      GUID Alias: STANDBYIDLE
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

    Power Setting GUID: 94ac6d29-73ce-41a6-809f-6363ba21b47e  (Allow hybrid sleep)
      GUID Alias: HYBRIDSLEEP
      Possible Setting Index: 000
      Possible Setting Friendly Name: Off
      Possible Setting Index: 001
      Possible Setting Friendly Name: On
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

    Power Setting GUID: 9d7815a6-7ee4-497e-8888-515a05f02364  (Hibernate after)
      GUID Alias: HIBERNATEIDLE
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

    Power Setting GUID: bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d  (Allow wake timers)
      GUID Alias: RTCWAKE
      Possible Setting Index: 000
      Possible Setting Friendly Name: Disable
      Possible Setting Index: 001
      Possible Setting Friendly Name: Enable
      Possible Setting Index: 002
      Possible Setting Friendly Name: Important Wake Timers Only
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

  Subgroup GUID: 2a737441-1930-4402-8d77-b2bebba308a3  (USB settings)
    Power Setting GUID: 48e6b7a6-50f5-4782-a5d4-53bb8f07e226  (USB selective suspend setting)
      Possible Setting Index: 000
      Possible Setting Friendly Name: Disabled
      Possible Setting Index: 001
      Possible Setting Friendly Name: Enabled
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

  Subgroup GUID: 4f971e89-eebd-4455-a8de-9e59040e7347  (Power buttons and lid)
    GUID Alias: SUB_BUTTONS
    Power Setting GUID: a7066653-8d6c-40a8-910e-a1f54b84c7e5  (Start menu power button)
      GUID Alias: UIBUTTON_ACTION
      Possible Setting Index: 000
      Possible Setting Friendly Name: Sleep
      Possible Setting Index: 001
      Possible Setting Friendly Name: Hibernate
      Possible Setting Index: 002
      Possible Setting Friendly Name: Shut down
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

  Subgroup GUID: 501a4d13-42af-4429-9fd1-a8218c268e20  (PCI Express)
    GUID Alias: SUB_PCIEXPRESS
    Power Setting GUID: ee12f906-d277-404b-b6da-e5fa1a576df5  (Link State Power Management)
      GUID Alias: ASPM
      Possible Setting Index: 000
      Possible Setting Friendly Name: Off
      Possible Setting Index: 001
      Possible Setting Friendly Name: Moderate power savings
      Possible Setting Index: 002
      Possible Setting Friendly Name: Maximum power savings
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

  Subgroup GUID: 54533251-82be-4824-96c1-47b60b740d00  (Processor power management)
    GUID Alias: SUB_PROCESSOR
    Power Setting GUID: 893dee8e-2bef-41e0-89c6-b55d0929964c  (Minimum processor state)
      GUID Alias: PROCTHROTTLEMIN
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000064
    Current DC Power Setting Index: 0x00000005

    Power Setting GUID: 94d3a615-a899-4ac5-ae2b-e4d8f634367f  (System cooling policy)
      GUID Alias: SYSCOOLPOL
      Possible Setting Index: 000
      Possible Setting Friendly Name: Passive
      Possible Setting Index: 001
      Possible Setting Friendly Name: Active
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

    Power Setting GUID: bc5038f7-23e0-4960-96da-33abaf5935ec  (Maximum processor state)
      GUID Alias: PROCTHROTTLEMAX
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000064
    Current DC Power Setting Index: 0x00000064

  Subgroup GUID: 7516b95f-f776-4464-8c53-06167f40cc99  (Display)
    GUID Alias: SUB_VIDEO
    Power Setting GUID: 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e  (Turn off display after)
      GUID Alias: VIDEOIDLE
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x00000708
    Current DC Power Setting Index: 0x00000258

    Power Setting GUID: aded5e82-b909-4619-9949-f5d71dac0bcb  (Display brightness)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000064
    Current DC Power Setting Index: 0x00000064

    Power Setting GUID: f1fbfde2-a960-4165-9f88-50667911ce96  (Dimmed display brightness)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000032
    Current DC Power Setting Index: 0x00000032

    Power Setting GUID: fbd9aa66-9553-4097-ba44-ed6e9d65eab8  (Enable adaptive brightness)
      GUID Alias: ADAPTBRIGHT
      Possible Setting Index: 000
      Possible Setting Friendly Name: Off
      Possible Setting Index: 001
      Possible Setting Friendly Name: On
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

  Subgroup GUID: e73a048d-bf27-4f12-9731-8b2076e8891f  (Battery)
    GUID Alias: SUB_BATTERY
    Power Setting GUID: 5dbb7c9f-38e9-40d2-9749-4f8a0e9f640f  (Critical battery notification)
      GUID Alias: BATFLAGSCRIT
      Possible Setting Index: 000
      Possible Setting Friendly Name: Off
      Possible Setting Index: 001
      Possible Setting Friendly Name: On
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

    Power Setting GUID: 637ea02f-bbcb-4015-8e2c-a1c7b9c0b546  (Critical battery action)
      GUID Alias: BATACTIONCRIT
      Possible Setting Index: 000
      Possible Setting Friendly Name: Do nothing
      Possible Setting Index: 001
      Possible Setting Friendly Name: Sleep
      Possible Setting Index: 002
      Possible Setting Friendly Name: Hibernate
      Possible Setting Index: 003
      Possible Setting Friendly Name: Shut down
    Current AC Power Setting Index: 0x00000002
    Current DC Power Setting Index: 0x00000002

    Power Setting GUID: 8183ba9a-e910-48da-8769-14ae6dc1170a  (Low battery level)
      GUID Alias: BATLEVELLOW
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x0000000a
    Current DC Power Setting Index: 0x0000000a

    Power Setting GUID: 9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469  (Critical battery level)
      GUID Alias: BATLEVELCRIT
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000005
    Current DC Power Setting Index: 0x00000005

    Power Setting GUID: bcded951-187b-4d05-bccc-f7e51960c258  (Low battery notification)
      GUID Alias: BATFLAGSLOW
      Possible Setting Index: 000
      Possible Setting Friendly Name: Off
      Possible Setting Index: 001
      Possible Setting Friendly Name: On
    Current AC Power Setting Index: 0x00000001
    Current DC Power Setting Index: 0x00000001

    Power Setting GUID: d8742dcb-3e6a-4b3c-b3fe-374623cdcf06  (Low battery action)
      GUID Alias: BATACTIONLOW
      Possible Setting Index: 000
      Possible Setting Friendly Name: Do nothing
      Possible Setting Index: 001
      Possible Setting Friendly Name: Sleep
      Possible Setting Index: 002
      Possible Setting Friendly Name: Hibernate
      Possible Setting Index: 003
      Possible Setting Friendly Name: Shut down
    Current AC Power Setting Index: 0x00000000
    Current DC Power Setting Index: 0x00000000

    Power Setting GUID: f3c5027d-cd16-4930-aa6b-90db844a8f00  (Reserve battery level)
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0x00000064
      Possible Settings increment: 0x00000001
      Possible Settings units: %
    Current AC Power Setting Index: 0x00000007
    Current DC Power Setting Index: 0x00000007

나는 이것들 중 하나도 정말로 이해하지 못합니다 ...

수동으로 수행하고 싶지 않은 전원 옵션을 위에 게시된 설정으로 자동 변경하려면 스크립트를 어떻게 사용합니까?

답변1

설정 powercfg은 이해하기 어렵지 않습니다. 내 디스플레이 절전 설정은 다음과 같습니다.

  Subgroup GUID: 7516b95f-f776-4464-8c53-06167f40cc99  (Display)
    GUID Alias: SUB_VIDEO
    Power Setting GUID: 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e  (Turn off display after)
      GUID Alias: VIDEOIDLE
      Minimum Possible Setting: 0x00000000
      Maximum Possible Setting: 0xffffffff
      Possible Settings increment: 0x00000001
      Possible Settings units: Seconds
    Current AC Power Setting Index: 0x00000384
    Current DC Power Setting Index: 0x00000384

처음 몇 줄에는 설정의 고유 식별자가 포함되어 있습니다.

  • 표시 그룹의 ID(751로 시작)
  • "디스플레이 끄기" 설정의 ID(3c0으로 시작)
  • 이 설정에 허용되는 최대 및 최소 값은 0과 ffffffff 사이에 표시됩니다.
  • 설정에 대한 해상도(이 경우 1씩 증가)입니다.
  • 이 값이 측정하는 단위이며, 이 경우 초입니다.
  • 현재 AC 및 DC 설정은 모두 0x384로 설정되어 있으며 십진수로 900초, 즉 15분을 나타냅니다.

/SETACVALUEINDEX( 또는 /SETDCVALUEINDEX) 를 사용하여 AC(또는 DC) 값을 설정할 수 있습니다.

  • 먼저 귀하의 경우를 사용하여 나열된 전원 설정 구성표(GUID별)를 지정합니다 /l. 활성 설정은 GUID가 다음과 같은 고성능 설정입니다.8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
  • 그런 다음 하위 그룹 GUID를 지정합니다. 제 경우 디스플레이 설정 GUID는 다음과 같습니다.7516b95f-f776-4464-8c53-06167f40cc99
  • 그 뒤에는 설정 GUID가 옵니다.3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e
  • 그런 다음 우리가 원하는 새 값은 10진수(또는 앞에 0x가 있는 16진수)일 수 있습니다.

이는 AC 디스플레이 절전 설정을 변경하기 위해 실행하는 명령입니다.

powercfg /SETACVALUEINDEX fb5220ff-7e1a-47aa-9a42-50ffbf45c673 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 600

이것은 내 컴퓨터의 GUID를 사용하여 절전 시간 제한을 10분(600초)으로 설정합니다.

명령 과 함께 나열된 GUID 별칭을 사용할 수도 있습니다 /q.

  • SUB_VIDEO별칭은 다음과 같습니다.7516b95f-f776-4464-8c53-06167f40cc99
  • VIDEOIDLE별칭은 다음과 같습니다.3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e

나는 이러한 별칭 이름이 컴퓨터 전체에서 동일하다고 가정합니다. 전원 구성표에는 별칭이 없습니다. 따라서 명령은 다음과 같습니다.

powercfg /SETACVALUEINDEX fb5220ff-7e1a-47aa-9a42-50ffbf45c673 SUB_VIDEO VIDEOIDLE 600

답변2

신경 쓰지 마세요. 다시 한 번 해결했습니다.

방금 전체 레지스트리 키를 regedit.exe.

여기에 게시하기에는 파일이 너무 길어서 더 긴 ps1 파일로 변환하여 Google 드라이브에 업로드했습니다.PowerCFG.reg그리고PowerCFG_reg.ps1

레지스트리 파일에는 9232줄과 645546자가 있고, 스크립트 파일에는 3491줄과 855339자가 있습니다. 레지스트리 파일을 가져올 수도 있을 것 같아요.

가이드와 헥스를 이해하는 것은 너무 어렵고 에너지가 너무 많이 들기 때문에 효율적이지 않습니다.

그러나 모든 설정은 이 레지스트리 키에 저장되므로:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power

간단히 내보내고 가져오면 원하는 대로 설정이 설정되어야 합니다. 이러한 키와 값을 각각 이해할 필요는 없으며 컴퓨터에 키를 가져오라고 지시하기만 하면 됩니다.

확인했습니다. 두 번 클릭하면 reg import설정이 제대로 가져오지 않으며 액세스가 거부됩니다.

그래서 다음 방법으로 키를 가져왔습니다.

psexec -S cmd /k reg import PowerCFG.reg

TrustedInstaller 권한을 사용하면 명령이 오류 없이 성공적으로 완료되었습니다.


추신

_reg.ps1 파일을 실행하려고 하면 다음과 같은 오류가 많이 발생합니다.

Set-ItemProperty: C:\Users\Estranger\Desktop\PowerCFG_reg.ps1:752
Line |
 752 |  Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\ …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot convert value "0xda7f5e8cbfe8964a9a85a6e23a8c635c" to type "System.Byte[]". Error: "Cannot
     | convert value "0xda7f5e8cbfe8964a9a85a6e23a8c635c" to type "System.Byte". Error: "Value was either too
     | large or too small for a UInt32.""

위반자는 REG_BINARY 값입니다.

관련 정보