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 Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 0 /f

Restart after the operation could be required.

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
#{c},calc.exe

;Win+Shift+N – start notepad
+#{n},notepad.exe

;Win+N – start notepad++ together with apploc.exe
#{n},%windir%\AppPatch\AppLoc.exe,”%ProgramFiles%\Notepad++\notepad++.exe” -nosession /L0419

Continue reading

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

  1. Start the policy editor (Control Panel -> Administrative tools -> Local security policy)
  2. Select “Local policy” item
  3. Find the item “Devices: Prevent Users from Installing Printer Drivers” in the section Security Settings -> Security Options and change it to Enabled
  4. Go to “Security Settings -> User Rights Assignment” section and check, that “Load & Unalod Drivers” option contains the active user group. It important, that even if it has “All Staff” already, it still could miss “Administrators” group, so it’s necessary to add it manually.

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% is replaced by empty string.
Spaces are mandadory in "/* some_label */" string.

Another possibility:
[cc lang="dos"]
@(
echo select global_name from global_name ;
) | sqlplus USER/PASS@SERVER
[/cc]

[amazon-product]0735622620[/amazon-product]