Skip to main content

Posts

Native boot into VHDX

Native boot into VHDX Why would you boot into VHDX instead of dual booting? Because it is easy(ier) vs adjusting partition post-Windows installation. And the partition layout may not be easy to adjust without using advanced partitioning tool. Also booting into native VHDX gives full access to the hardware without the penalty of virtualization. This allow you to run say other virtuaization on top of native boot! I prepare VHDX using Hyper-V and once it is ready to my liking I use the VHDX to boot into it. Below are the general steps: Copy a VHDX into the desired location. For example, copy C:\VMs\W21H1M2\Virtual Hard Disks\W21H1M2.vhdx to C:\VMs\NaviteBoot\NaviteBoot.vhdx Mount C:\VMs\NaviteBoot\NaviteBoot.vhdx using File Explorer Note of volume/drive letter for the mounted VHDX, e.g. V: Change directory to V:\Windows Run bcdboot V:\Windows . This should have added the VHDX into the boot options Optional, change the boot description. Get the GUID entry for the jus

Get display resolution from the command line

Get display resolution from the command line This will get both local resolution and remote desktop screen resolution using WMIC. c:\>wmic path Win32_VideoController get VideoModeDescription Sample out below when run on remote desktop session VideoModeDescription 1024 x 768 x 4294967296 colors 1912 x 989 x 4294967296 colors Tags: WMIC screen resolution

Windows Quick Tip: Enable/Disable Run Dialog history

Windows Quick Tip: Enable/Disable Run Dialog history Windows Run Dialog history can be disalbed for security or enabled for convenience To enable/disable, navigate to the registry key below: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced Start_TrackProgs DWORD 0 = Turn off 1 = Turn on

PowerShell Quick Tip: Change screen resolution from the command line

PowerShell Quick Tip: Change screen resolution from the command line I had a VM that I can't open Display Settings , so had to figure out how to change the screen resolution from the command line. This can also be handy if you have several machines that for some reason has to be running at specified resolution, for example, running UI automated tests. PS C:\>Set-DisplayResolution -Width 1600 -Height 900 Tags:PowerShell, command line, screen resolution

CPP: Windows: GetDiskFreeSpaceExW

CPP: Windows: GetDiskFreeSpaceExW Retrieves information about the amount of space that is available on a disk volume, which is the total amount of space, the total amount of free space, and the total amount of free space available to the user that is associated with the calling thread. Notes: - Tested using Visual Studio 2022 (17.2.6) C++ Windows Console template Reference(s): https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getdiskfreespaceexw