Команда для перехода в спящий режим windows 10

Друзья, хочу поделиться с вами полезным лайфхаком для Windows 10. Многие из нас привыкли использовать Alt + F4 или другие стандартные комбинации для перевода компьютера в спящий режим. Но что, если я скажу вам, что есть способ сделать это еще удобнее?

В Windows 10 и 11 есть возможность создать собственное сочетание клавиш для перехода в спящий режим. Это не только упростит процесс, но и позволит вам настроить систему под свои предпочтения.

Процесс настройки довольно прост и не требует глубоких технических знаний.

Сообщество:

Кстати, много полезного, интересного в мире ИИ и Технологий, а также лайфхаки есть в нашем Telegram-канале

Найдите свободное место на рабочем столе.
Щелкните правой кнопкой мыши, чтобы вызвать контекстное меню.
В появившемся меню наведите курсор на пункт «Создать».
Из выпадающего списка выберите опцию «Ярлык».

В появившемся диалоговом окне «Создание ярлыка» вам нужно ввести специальную команду.
Скопируйте и вставьте следующее:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Эта команда создаст ярлык для перехода в спящий режим прямо на вашем рабочем столе.
Нажимаем «Далее».

Далее пишем название нашего ярлыка, например: Сон.

Готово, у нас теперь есть EXE-шник для перевода компьютера в сон.

Но все еще чего-то не хватает… Эстетики) Меняем значок:

Щелкаем правой кнопкой на созданный нами ярлык и выбираем «Свойства». В появившемся окне нажимаем «Сменить значок» и выбираем тот, который нам больше всего нравится.

Если вам не нравятся стандартные значки, не проблема) В интернете можно найти множество красивых иконок (формат ICO) на любой вкус и цвет. Просто скачайте понравившуюся и укажите путь к ней в этом же окне.

Прикольные иконки и многое другое есть в нашем Telegram-канале. Подписывайся, стань частью нашего сообщества!)

Learn the simple command to put your Windows 10 or 7 PC / Laptop in Sleep mode using the Command prompt or Desktop & Keyboard shortcut. 

The command prompt app is part of Windows Microsoft OS since we are having their GUI versions. Although today we can perform all tasks using our keyboard and mouse clicks on Windows, that doesn’t mean CMD is not useful anymore. Advanced users still using CMD or its successor PowerShell to perform various tasks. The reason behind using the command line is it saves our time. For example, if we want to enable some Windows features using GUI then we have to navigate through multiple elements, however, the same task can be done using CMD with just one command.

How to Sleep Windows 10 pc using cmd

Well to save power, Windows PC or laptop automatically puts itself in Sleep mode. However, we can do this manually as well either using the option given in the Start Menu or by simply using a command in prompt.

  • Go Windows 10 or 7 search box
  • Type CMD
  • As it appears click its icon to run the command prompt
  • Now, copy-paste this command –  rundll32.exe powrprof.dll, SetSuspendState Sleep
  • Hit the Enter key
  • This will immediately put your PC or laptop into Sleep mode

Sleep Windows 10 pc using cmd

Enable Windows Sleep Mode-  Create Keyboard shortcut

To set a Keyboard shortcut, first, we have created a file for that.

  • Right-click on empty space of Windows Desktop.
  • Select the “New -› Shortcut” option.
  • Enter the complete command – rundll32.exe powrprof.dll, SetSuspendState Sleep
  • Click “Next“.
  • Assign a name of your choice, such as “Sleep Mode“, and select the “Finish” button.
  • Again right-click on your newly created Shortcut.
  • Select Properties, and enter Ctrl-Alt-D or whatever alphabet key you want to assign in the “Shortcut Key” field.
  • Press Apply and then Okay button.
  • After that whenever you want your Windows 10 or 7 PC to put in Sleep mode just press the assigned Keyboard shortcut.

Select and create new keyboard shorcut in WIndows 10

Name Sleep mode

Seel mode Command for Windows

Create Shortcut propterties

Как выключить компьютер в командной строке, перезагрузить его или перевести в спящий режим

Если по какой-либо причине вам потребовалось выполнить завершение работы через командную строку, возможно — перезагрузить компьютер, перевести его в спящий режим или гибернацию, всё это возможно сделать во всех актуальных версиях Windows.

В этой инструкции подробно о том, как выключить компьютер через командную строку и про выполнение других действий, связанных с перезагрузкой и завершением работы в Windows 11, Windows 10 и других версиях системы. На близкую тему может быть полезным: Как выключить компьютер без мыши.

Команды shutdown.exe — основной способ для завершения работы и перезагрузки

Параметры команды shutdown.exe

В Windows предусмотрена встроенная утилита shutdown.exe, предназначенная для выполнения рассматриваемых в инструкции задач, её можно использовать:

  • В командной строке и PowerShell
  • В диалоговом окне «Выполнить»
  • В BAT-файлах
  • Для создания ярлыка выключения компьютера

Управление утилитой производится с помощью передаваемых ей параметров, полный список которых можно получить, введя команду shutdown /? в командной строке.

Несколько базовых вариантов использования команд shutdown.exe (при вводе команды .exe указывать не обязательно):

  • shutdown /s /t 0 — завершение работы прямо сейчас: время в секундах указывается после параметра t
  • shutdown /r /t 0 — немедленная перезагрузка компьютера
  • shutdown /h /t 0 — перевести компьютер в режим гибернации (при условии, что гибернация не отключена)
  • shutdown /l — выход из системы
  • shutdown /s /hybrid /t 0 — завершение работы с подготовкой к режиму быстрого запуска

Параметры команды shutdown можно указывать как после значка «/», так и после «-», например, следующая команда будет работать так же, как первая в списке:

shutdown -s -t 0

Помимо приведенных примеров команд, вы можете:

  • Изменять значение параметры /t — чтобы установить время до выполнения команды в секундах, например, если вам требуется настроить таймер выключения компьютера
  • При использовании отличного от 0 значения параметра /t добавить параметр /f — чтобы принудительно завершить все открытые программы при выключении

Также рекомендую изучить другие доступные параметры shutdown.exe, использую эту команду с параметром /? — возможно, вы найдёте дополнительные полезные для себя возможности.

Обычно для выключения компьютера с помощью командной строки используется именно shutdown.exe, но есть и иные возможности.

Среди других способов выключить, перезагрузить или перевести в спящий режим (гибернацию) компьютер с помощью командной строки:

Надеюсь, для кого-то из читателей инструкция будет полезной. Если остаются вопросы, вы можете задать их в комментариях ниже, а я постараюсь оперативно ответить.

Turn your PC off completely

To shut down, select Start  and then select Power  > Shut down .

Sleep

Sleep uses very little power, your PC starts up faster, and you’re instantly back to where you left off. You don’t have to worry that you’ll lose your work because of your battery draining because Windows automatically saves all your work and turns off the PC if the battery is too low. Use Sleep when you’re going to be away from your PC for just a little while—like when you’re taking a coffee break.

For a lot of PCs (especially laptops and tablets), your PC goes to sleep when you close your lid or press the power button.

To set your PC so it goes to sleep when you close the lid or press the power button:

  1. Select Search  on the taskbar, type control panel, and select it from the results.

  2. Select System and Security.

  3. In the Power Options section, select Change what the power buttons do.

  4. Select Change settings that are currently unavailable.

  5. Select options based on how you want Sleep to work:

    • For a laptop, expand the list for When I close the lid in the On battery column and select Sleep. Repeat for the Plugged in column, if desired.

    • For a desktop, tablet, or laptop, expand the list for When I press the power button in the On battery column and select Sleep. Repeat for the Plugged in column, if desired.

  6. Select Save changes.

When you’re ready to make your PC sleep, just press the power button on your desktop, tablet, or laptop, or close your laptop’s lid.

On most PCs, you can resume working by pressing your PC’s power button. However, not all PCs are the same. You might be able to wake it by pressing any key on the keyboard, clicking a mouse button, or opening the lid on a laptop. Check the documentation that came with your computer or go to the manufacturer’s website.

Hibernate

This option was designed for laptops and might not be available for all PCs. (For example, PCs with InstantGo don’t have the hibernate option.) Hibernate uses less power than sleep and when you start up the PC again, you’re back to where you left off (though not as fast as sleep).

Use hibernation when you know that you won’t use your laptop or tablet for an extended period and won’t have an opportunity to charge the battery during that time. First check to see if this option is available on your PC and if it is, turn it on.

To set your PC so it can hibernate:

  1. Select Search  on the taskbar, type control panel, and select it from the results.

  2. Select System and Security.

  3. In the Power Options section, select Change what the power buttons do.

  4. Select Change settings that are currently unavailable.

  5. In the Shutdown settings section, select Hibernate.

  6. Select Save changes.

Now you’ll be able to hibernate your PC in a few different ways:

  • Select Start , and then select Power  > Hibernate.

  • Press the Windows logo key + X on your keyboard, and then select Shut down or sign out > Hibernate.

  • You can also set closing the lid or pressing the power or sleep buttons to hibernate your PC, if you so desire, using the same directions in To set your PC so it goes to sleep when you close the lid or press the power button.

Note: If devices connected to your PC (like monitors, printers, or scanners) aren’t working properly after waking up from sleep or hibernate, you might need to disconnect and reconnect your device or restart your PC. You should also make sure that you have the most current drivers for all of your devices.

Recently one of our readers asked us how to make his Windows 10 PC enter sleep from the command line. This can be definitely useful if you are using the sleep mode frequently and want to create a shortcut to put your PC into sleep directly or via some batch file. In this article, I would like to share a working way to initiate sleep from the command line.

Windows 10 banner logo devs 02

Windows10 only allows the hardware Power button or the Start Menu power button to enter Sleep (standby) mode. It does not provide a command line tool to directly enter sleep.

If hibernation is disabled on your PC, you can enter Sleep mode using the following command:

rundll32.exe powrprof.dll,SetSuspendState 0,1,0

Windows 10 sleep command 1

But if you have enabled hibernation, then the above command hibernates the PC instead of entering sleep mode. So you need to apply a workaround which isn’t exactly ideal, something like this.

powercfg -h off
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
powercfg -h on

Windows 10 sleep command 2

In the example above, I’ve used the powercfg command to disable hibernation, just before using the Rundll32 command. Then the rundll32 command will work correctly and put the PC into sleep. When it wakes up, the last line will turn on hibernation. Another issue with this workaround is that it must be executed from an elevated command prompt.

Instead, I will show you how to enter sleep without disabling hibernation and without requiring elevated (administrator) privileges.

Download the PsShutdown tool by SysInternals. Using this tool, you will be able to make the PC enter sleep mode directly by giving a single command:

psshutdown.exe -d -t 0 -accepteula

I recommend PsShutdown as the preferred way to send a PC to sleep.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Ati radeon hd 4300 series драйвера для windows 10 64 bit
  • Webplugin exe не устанавливается windows 10
  • Распознавание речи на русском языке в windows 10
  • Программа для полного отключения защитника windows 10
  • Usb 3 xhci driver stack for windows 7 vista