Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Tuesday, 8 April 2025

How to enable Windows Recovery Environment (WinRE) on Windows 11 and 10


The Windows Recovery Environment (WinRE) is an essential feature in Windows 11 and Windows 10, providing tools like automatic repair, system reset, and command prompt access to troubleshoot and resolve system issues. While WinRE is typically enabled by default, there are scenarios where it might be disabled, either intentionally or due to system modifications. This guide will walk you through the steps to enable or disable WinRE on your Windows device.

How to Enable Windows Recovery Environment (WinRE)

If you find that WinRE is disabled on your system, you can enable it using the Command Prompt with administrative privileges. Here's how:​

  1. Open Command Prompt as Administrator:

    • Click on the Start menu.

    • Type "Command Prompt" in the search bar.

    • Right-click on the Command Prompt app and select Run as administrator.

  2. Check the Status of WinRE:

    • In the Command Prompt window, type the following command and press Enter: reagentc /info

    • This command displays the current status of WinRE. Look for the "Windows RE status" line to see if it's enabled or disabled.

  3. Enable WinRE:

    • To enable WinRE, type the following command and press Enter: reagentc /enable

    • After executing this command, you should see a confirmation message indicating that WinRE has been enabled.​

  4. Verify WinRE is Enabled:

    • To confirm that WinRE is now enabled, you can re-run the reagentc /info command. The "Windows RE status" should now display as "Enabled".​

Once enabled, you can access WinRE by restarting your computer and pressing the appropriate key (often F8) during boot, or by navigating through the Settings app under Update & Security > Recovery > Advanced startup.​

How to Disable Windows Recovery Environment (WinRE)

If, for security or administrative reasons, you need to disable WinRE, follow these steps:​

  1. Open Command Prompt as Administrator:

    • Click on the Start menu.​

    • Type Command Prompt in the search bar.​

    • Right-click on the Command Prompt app and select Run as administrator.​

  2. Check the Status of WinRE:

    • In the Command Prompt window, type the following command and press Enter:​ reagentc /info

    • This will show the current status of WinRE.​

  3. Disable WinRE:

    • To disable WinRE, type the following command and press Enter:​ reagentc /disable

    • You should receive a confirmation message indicating that WinRE has been disabled.​

  4. Verify WinRE is Disabled:

    • To ensure that WinRE is disabled, re-run the reagentc /info command. The "Windows RE status" should now display as "Disabled".​

Disabling WinRE will prevent access to the recovery tools during boot, so ensure that this action aligns with your system management policies.​

By managing the state of the Windows Recovery Environment appropriately, you can maintain control over the troubleshooting tools available on your Windows 11 or Windows 10 system, ensuring they align with your usage and security requirements.

Friday, 15 September 2023

PowerShell - Special Folders (System Folders)

In VBscript, there existed a concept known as Special Folders, for example, My Documents which could be accessed using the Shell. Application object and passing in a constant that applied to a certain folder. This is also possible using PowerShell.



$a = New-Object -ComObject Shell.Application
Get-ChildItem $a.NameSpace(0x21).Self.Path

The prior two lines of code can also be written as follows: 

Get-ChildItem ((New-Object -ComObject Shell.Application).Namespace(0x21).Self.Path)

Below is the list of special folders and its hex number, please do comment on this post if any of them is/are wrong:

Hex Number Folder Name
0x1 Internet Explorer
0x2 Programs
0x3 Control Panel
0x4 Printers and Faxes
0x5 My Documents
0x6 Favorites
0x7 Startup
0x8 My Recent Documents
0x9 SendTo
0xa Recycle Bin
0xb Start Menu
0xd My Music
0xe My Videos
0x10 Desktop
0x11 My Computer
0x12 My Network Places
0x13 NetHood
0x14 Fonts
0x15 Templates
0x16 All Users Start Menu
0x17 All Users Programs
0x18 All Users Startup
0x18 All Users Startup
0x19 All Users Desktop
0x1a Application Data
0x1b PrintHood
0x1c Local Settings Application Data
0x20 Local Settings Temporary Internet Files
0x21 Cookies
0x22 Local Settings History
0x23 All Users Application Data
0x24 Windows
0x25 System32
0x26 Program Files
0x27 My Pictures
0x28 User Profile
0x2b Common Files
0x2e All Users Templates
0x2f Administrative Tools
0x31 Network Connections


You can also use the .NET way in PowerShell: 

[System.Environment]::GetFolderPath("<SpecialFolder>")
  • Desktop
  • Programs
  • Personal
  • MyDocuments
  • Favorites
  • Startup
  • Recent
  • SendTo
  • StartMenu
  • MyMusic
  • DesktopDirectory
  • MyComputer
  • Templates
  • ApplicationData
  • LocalApplicationData
  • InternetCache
  • Cookies
  • History
  • CommonApplicationData
  • System
  • ProgramFiles
  • MyPictures
  • CommonProgramFiles

Between the following are the possible Enumeration values and their associated numeric values, the VBScript version appears to have more alternatives than the .NET version:
  •  0  Desktop 
  •  2  Programs 
  •  5  Personal 
  •  6  Favourites 
  •  7  Startup 
  •  8  Recent 
  •  9  SendTo 
  •  11 StartMenu 
  •  13 MyMusic 
  •  16 DesktopDirectory 
  •  17 MyComputer 
  •  21 Templates 
  •  26 ApplicationData 
  •  28 LocalApplicationData 
  •  32 InternetCache 
  •  33 Cookies 
  •  34 History 
  •  35 CommonApplicationData 
  •  37 System 
  •  38 ProgramFiles 
  •  39 MyPictures 
  •  43 CommonProgramFiles

What's new in Microsoft Intune: April 2025

Microsoft Intune's April 2025 release introduces several enhancements aimed at improving device management and security: Custom Naming ...