User Tools

Site Tools


kb:common:windows

Windows

Disable Security Questions Windows 11/10 via Local Group Policy Editor

  1. Press Windows + R key combinations to open the Run window.
  2. Input gpedit.msc in the text box and press Enter.
  3. In the left panel, navigate to the following location:
  4. Computer Configuration > Administrative Templates > Windows Components > Credential User Interface
  5. In the right panel, double-click Prevent the use of security questions for local accounts.
  6. In the pop-up window, select the option of Enabled, then click Apply > OK.

Remote Desktop

To enable remote desktop and allow to log in via certain users, follow these steps:

  1. On the device you want to connect to, select Start and then click the Settings icon on the left.
  2. Select the System group followed by the Remote Desktop item.
  3. Use the slider to enable Remote Desktop.
  4. It is also recommended to keep the PC awake and discoverable to facilitate connections. Click Show settings to enable.
  5. As needed, add users who can connect remotely by clicking Select users that can remotely access this PC.
  6. Members of the Administrators group automatically have access.
  7. Make note of the name of this PC under How to connect to this PC. You'll need this to configure the clients.

Map Network Drives

Mapping with different credentials only stays persistent after restart, if you select both options the first time you create the network drive. (internal: use “COMP-NAS” on our buildservers instead of the IP)


Elevated Programs and Network Drives

One of the useful tools that Windows offers is the ability to assign drive letters to the network locations. You can use the Map Network Drive command of Windows Explorer or AB Commander to create the network drives. After a network drive has been created, you can use it just like any other drive: browse its contents, copy file to or from it, and so on.

A problem may occur, however, if you use Windows Vista or Windows 7 and need to access the network drive from an application that runs elevated (a.k.a. as administrator).
  • create a new DWORD entry with the name EnableLinkedConnections and value 1 in HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System
  • you can do this with this single command (as admin): reg add “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System” /v “EnableLinkedConnections” /t REG_DWORD /d 0x00000001 /f

Case Sensitivity

Taken in part from Case Sensitivity on Microsoft Learn platform

When working with both Linux and Windows files and directories, you may need to adjust how case sensitivity is handled. Standard behavior:

  • Windows file system treats file and directory names as case-insensitive. FOO.txt and foo.txt will be treated as equivalent files.
  • Linux file system treats file and directory names as case-sensitive. FOO.txt and foo.txt will be treated as distinct files.

The Windows file system supports setting case sensitivity with attribute flags per directory. While the standard behavior is to be case-insensitive, you can assign an attribute flag to make a directory case sensitive, so that it will recognize Linux files and folders that may differ only by case.

Windows Linux Subsystem

Windows PowerShell opened in administrator mode

Run the following:

  Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

This takes a few seconds and will (prompt you to) restart your computer.

Change CS Settings

Windows PowerShell opened in administrator mode

To inspect case sensitivity settings, run:

  fsutil.exe file queryCaseSensitiveInfo <path>

To enable case sensitivity, run:

  fsutil.exe file SetCaseSensitiveInfo <path> enable

To disable case sensitivity, run:

  fsutil.exe file SetCaseSensitiveInfo <path> disable

Icon Cache

To clear the Windows icon cache, you typically delete the IconCache.db (or similar iconcache*) file from your %localappdata% folder and then restart Windows Explorer or your PC. This can be done manually or via Command Prompt/PowerShell by deleting cache files and stopping/restarting the explorer.exe process.

You can find the IconCache.db file in C:\Users\<YourUsername>\AppData\Local, often requiring hidden files to be shown in File Explorer.


Win11 Right-Click Menu

Windows 11 has replaced the classic right click menue and shows this instead:

To enable the old classic menu run this in a CMD:

 reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
 taskkill /f /im explorer.exe
 explorer.exe


ProgramData Access Rights

On Windows, C:\ProgramData is modifiable by normal users by default, but many installers create subfolders with restrictive ACL inheritance (or set explicit ACLs) so standard users can’t read/write them.

Grant Modify to all standard users (recommended):

  icacls "C:\ProgramData\YourCompany\YourApp" /grant *S-1-5-32-545:(OI)(CI)M /T
  • S-1-5-32-545 = BUILTIN\Users (all standard users, not Everyone)
  • (OI)(CI) = inherit to files + subfolders
  • M = Modify
  • /T applies to existing children too

A batch DACL.bat file that wraps the command:

  @echo off
  setlocal
  
  if "%~1"=="" (
      echo Usage: %~nx0 "Path"
      exit /b 1
  )
  
  set "TARGET=%~1"
  
  if not exist "%TARGET%" (
      echo Path does not exist: %TARGET%
      exit /b 1
  )
  
  icacls "%TARGET%" /grant "*S-1-5-32-545:(OI)(CI)M" /T
  exit /b %ERRORLEVEL%

Call the batch file as follows:

  DACL.bat "C:\ProgramData\<MyCompany>\<MyApp>"

Extend the Windows system partition when WinRE blocks the free space

taken from

If unallocated disk space is located behind the Windows Recovery Environment (WinRE) partition, Windows cannot extend the system partition because the free space is not directly adjacent. On an MBR disk, the WinRE partition can be deleted and recreated at the end of the disk:

  1. create a VM snapshot or verified backup
  2. verify the current WinRE location with reagentc /info
  3. disable WinRE
  4. delete only the reported recovery partition
  5. extend the system partition while reserving 1 GB
  6. create and format a new NTFS partition
  7. set its MBR partition type to 0x27
  8. re-enable WinRE
reagentc /info
reagentc /disable
 
Get-Disk
Get-Partition
 
Remove-Partition -DiskNumber 0 -PartitionNumber 3 -PassThru -Confirm:$false
 
[String]$DriveLetter = 'C'
[Int64]$WinREsize = 1024mb
[Int64]$NewSize = ((Get-PartitionSupportedSize -DriveLetter $DriveLetter).SizeMax - $WinREsize)
$NewSize
 
Resize-Partition -DriveLetter $DriveLetter -Size $NewSize
 
[string]$FileSystem = 'NTFS'
[string]$FileSystemLabel = 'WindowsRE'
New-Partition -DiskNumber 0 -UseMaximumSize | Format-Volume -FileSystem $FileSystem -NewFileSystemLabel $FileSystemLabel

Set the MBR partition type of the newly created recovery partition:

diskpart

Execute the following commands inside DiskPart:

select disk 0
select partition 3
set id=27 override
exit

Finally, re-enable Windows RE and verify its status and location:

reagentc /enable
reagentc /info
Get-Partition

The script deletes and recreates a disk partition. Create a snapshot or backup first. It supports MBR disks only; GPT disks require a different recovery-partition type and attributes.

kb/common/windows.txt · Last modified: 2026/09/03 13:40 by alexander.elbert