Skip to content

Instantly share code, notes, and snippets.

@Postrediori
Last active August 3, 2024 11:25
Show Gist options
  • Save Postrediori/70c3db1c9488fd00fa18b4e76c90caed to your computer and use it in GitHub Desktop.
Save Postrediori/70c3db1c9488fd00fa18b4e76c90caed to your computer and use it in GitHub Desktop.
Windows HowTos

Windows HowTos

Contents

Explorer and UI

Force "Details" folder view to show standard columns in folders with music files

  • Go in to the folder's Properties
  • Select the Customize tab
  • Under the section What kind of folder do you want? change the Optimize this folder for: option from Music to General Items.

Source: https://superuser.com/a/1478697/1860262

Disable web search in the start menu

In registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search

Make new DWORD (32-bit) BingSearchEnabled and set it to 0.

Part 2

In registry folder

HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer

Make new DWORD(32-bit) called DisableSearchBoxSuggestions and set it to 1.

Networking

Enable incoming ping

  • Open Windows Defender Firewall with Advanced Security by running WF.msc
  • In Inbound rules folder navigate to File and Printer Sharing (Echo Request ICMP...-In)

To filter IP addresses that are allowed to ping the machine

  • Open Properties of the rule
  • On the Scopes tab under Remote IP addresses list click Add and specify the IP address

Source: https://theitbros.com/allow-ping-icmp-echo-requests-on-windows-firewall/

Redirect IP in Windows

Identify loopback Idx (first column):

netsh int ip sh int

Add redirect rule:

netsh int ip add addr <IDX> <IP>/32 st=ac sk=tr

Verify that it works by running a sniffer or from command line

tracert -d <IP>

Remove the rule:

netsh int ip delete addr <IDX> <IP>

Source: https://serverfault.com/a/712997/480471

Power management (Windows 11)

Lock account and sleep when closing the laptop lid

Lock account

Navigate to Settings -> Accounts -> Sign-in options.

Under Additional settings set the parameter If you're been away, when should Windows require you to sign in again? to Every time.

Set Lid Close Action to Sleep

Open the Local Group Policy Editor gpedit.msc

Navigate to Computer Configuration -> Administrative Templates -> System -> Power Management -> Button Settings

Edit the following policies in Button Settings:

  • Select the lid switch action (plugged in)
  • Select the lid switch action (on battery)

Double click on the policy name, set it to Enabled and Lid Close Action parameter to Sleep.

Link: https://www.elevenforum.com/t/change-lid-close-action-in-windows-11.3356/#Six

Disable Modern Standby

This settings will set Standby (S3) as default standby mode and will bring back Power Management tab in device properties of Device Manager.

Open Registry Editor and navigate to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power

Create the following keys:

  • CsEnabled, type DWORD, value 0
  • PlatformAoAcOverride, type DWORD, value 0

Restart the system (Doing manual shut down and start won't apply the settings).

After that Standby (S3) will be listed in output of powercfg /a:

> powercfg /a
The following sleep states are available on this system:
    Standby (S3)
    Hibernate
    Fast Startup

And it Power Management tab in Device Manager will be available:

Power Management screenshot

Return Hibernate button to shutdown options

  • Open classic Control Panel (e.g. by control command).
  • Navigate to Power Options - Choose what the power buttons do and click Change settings that are currently unavailable
  • Enable Hibernate under Shutdown settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment