Skip to content

win general

Marcel Schmalzl edited this page Jan 12, 2024 · 16 revisions

This page addresses mainly Windows 10+

Power management

Disable Windows auto-power up:

Disable Windows from automatically power up/boot: Got to Start -> Edit power plan -> Advanced Settings -> in the tree search for Sleep -> expand and search for Allow wake timers -> change it to Disable.

Disk management

Remove EFI partition

The Disk Management software (default in Windows) will not allow to delete an EFI partition. Therefore you have to use the tool Diskpart (comes with Windows):

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          931 GB      0 B        *
  Disk 1    Online          111 GB   111 GB        *

DISKPART> sel disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 2    System             244 MB  1024 KB

DISKPART> sel partition 2

Partition 2 is now the selected partition.

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

Locations & Paths

  • UUIDs for mounted drives: execute the mountvol command (after the help message all drives will be shown)
  • Start menu entries
    • ALL Users: C:\ProgramData\Microsoft\Windows\Start Menu
    • Current User: %appdata%\Microsoft\Windows\Start Menu
  • Location of Windows native icons (see here)

Prevent all windows from being minimised by mouse gesture (window shaking)

This is probably the most annoying Windows feature in existence. You move a window and accidentally all other windows get minimised. Afterwards you see yourself shaking windows for a few minutes (you want your windows back "unminimised" and in their previous position) since this feature almost never works when it is deliberately wanted.

You can change this by

  • local group policy or
  • Windows registry

local group policy

  1. Open Edit Group Policy
  2. In the tree view go to: User Configuration > Administrative Templates > Desktop
  3. Enable Turn off Aero Shake window minimizing mouse gesture

Windows registry

Import the following (DWORD 32-bit) to your registry:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"DisallowShaking"=dword:00000001

Windows clock: show seconds

  1. Open regedit.exe
  2. Go to Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced
  3. In Advanced add a new entry (DWORD (32-bit) Value)
    1. Named ShowSecondsInSystemClock
    2. Value: 1
  4. Sign out and sign back in again

Environment Variables

Update within a PS (PowerShell) and Chocolatey without closing it

If you have Chocolatey installed just type RefreshEnv (NOT choco RefreshEnv).

Get variable

PS > $env:Path

Set variable

PS > $env:Path = "<string containing the PATH variables>"

# Append to env variable
PS > $env:TEAMS = $env:TEAMS + "<new path>"

Delete variable

Assigning an empty string deletes it.

PS > $env:Path = ''

Mount a network drive as different user

List all network shares

> net use
New connections will be remembered.

Status       Local     Remote                    Network

-------------------------------------------------------------------------------
			 E:        \\vboxsrv\Desktop         VirtualBox Shared Folders
			 H:        \\vboxsrv\share           VirtualBox Shared Folders
OK                       \\server\mynet                      Microsoft Windows Network
The command completed successfully.

Mount network share as user

> net use K: \\myserver\path\to\network\share /USER:<DOMAIN>\<USR>
#         ^^---- mount point

Troubleshooting

If the following error occurs:

System error 1219 has occurred.

Multiple connections to a server or shared resource by the same user, using more
 than one user name, are not allowed. Disconnect all previous connections to the
 server or shared resource and try again.

delete the connection via net use /DELETE \\myserver\path\to\network\share.

Clone this wiki locally