web analytics

Windows: get product key

To find the product key for Windows Vista / 7 / 8.x /10, run the following in the command line:

wmic path softwarelicensingservice get OA3xOriginalProductKey

Powershell analog:

powershell “(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey”

Windows: disable sticky keys

If some keyboard key is pressed several times in the short period of time, the accessibility window will appear. It’s possible to disable this behaviour.

Just create the following REG-file and import it with the regedit:

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys] "Flags"="0"

Alternative: just do it from the command line:

REG ADD "HKEY_CURRENT_USER\Control […]

AutoIt: script for hotkeys usage

This script allows You to define the global Windows hotkeys via the configuration file.

The syntax of the config file is simple:

Hotkey,Program,Parameters

Here “Hotkey” is the combination of the keyboard key with one of the identifiers:

^ Ctrl ! Alt + Shift # Windows-Key

Example:

;Win+C – start calculator […]

Windows: local printer option is greyed out

Some time ago I need to add the local printer to the system, however, this option was greyed out in the “Add printer” wizard. The problem was caused by local policy, preventing the adding of the new devices to the system.

The following should be done to enable “Add local printer” option

Start the policy […]

Windows 7: remove SP1 installation files

Here is the command to remove old installation files for SP1.

dism /online /cleanup-image /spsuperseded

Warning! The uninstallation of the Service Pack 1 will be impossible after removing these files!

How to find the version of DirectX

Start the dxdiag tool.

Windows XP: Start -> Run -> dxdiag

Windows Vista: Start -> Search -> dxdiag

…and if You could not find dxdiag, probably You do not have DirectX on Your machine. Are You still using old kind DOS box?

Start sqlplus in Windows .BAT script

Here is the example of emulating “HERE-documents” in Windows shell.

@ECHO OFF FIND "/*%none% some_label" <%0 |sqlplus USER/PASS@SERVER GOTO end : ———– embedded SQL————————- /* some_label */ select count(*) from dba_free_space; /* some_label */ select tablespace_name from dba_tablespaces; : ———– end of embedded SQL————————- :end

It’s also possible to use procedures in .bat files. %none% […]