Skip to main content

Posts

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

CPP: Windows: FindFirstVolumeW

CPP: Windows: FindFirstVolumeW Retrieves the name of a volume on a computer. FindFirstVolume is used to begin scanning the volumes of a computer. See line 85 for sample usage 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-findfirstvolumew