Sunday, October 09, 2022

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

Saturday, October 08, 2022

Running gles1-gears on QNX 6.6 VMware VM

Running gles1-gears on QNX 6.6 VMware VM

# telnetd -debug &
# export GRAPHICS_ROOT=/usr/lib/graphics/vmware
# screen
Using a telnet client, do:
# export GRAPHICS_ROOT=/usr/lib/graphics/vmware
# /usr/bin/gles1-gears

Run telnet server on QNX 6.6

Run telnet server on QNX 6.6

#: telnetd -debug

Thursday, October 06, 2022

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

Wednesday, October 05, 2022

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

Thursday, August 04, 2022

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

Installing QNX 6.4.1 on Ubuntu 20.04

Installing QNX 6.4.1 on Ubuntu 20.04 Install pre-requisites $: sudo dpkg --add-architecture i386 $: sudo apt update $: sudo apt install li...