Category Archives: Windows

Capture Screen with ffmpeg / screencast

On Windows you can record your screen to an .mp4 file using ffmpeg:

  • Download ffmpeg for Windows from http://ffmpeg.zeranoe.com/builds/
  • Run e.g. with following command: ffmpeg -f gdigrab -framerate 30 -show_region 1 -i desktop out.mp4

(the capture devices

video="UScreenCapture"

and

video="screen-capture-recorder"

did not work for me on my Windows 10 machine, they were not even listed in the available video devices.)

For details see ffmpeg's https://trac.ffmpeg.org/wiki/Capture/Desktop

On Windows 10, you can also try to use Windows' Screen Recording to record a window. Just press Win+G and check Yes, this is a game. Afterwards you get a Record button. Your recordings will be saved to %HOMEPATH%\Videos\Captures

Start an application with the debugger attached

You can automatically attach the Visual Studio Just-In-Time debugger when a process is started on Windows. The steps are simple:

  • Open the Registry Editor
  • navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
  • Select the application you want to debug:
    • Either it already exists as subkey, then use that one
    • Or, you have to create a new key in Image File Execution Options with the name of the application (e.g. chrome.exe)
  • Create a new string value with name debugger and name vsjitdebugger.exe

regedit_debugger

Enable VT-x for VirtualBox

My Virtual Machine was running very slow in VirtualBox 4.3.28. Unbearable slow. I though I remembered running it faster, but I wasn't sure.

Indicators for the problem I'll describe next are:

  • In CPU-Z the VT-x feature is missing in the Instructions list of the CPU.
  • In VirtualBox's Create New dialog box only 32-bit OS are shown.
  • In VirtualBox's settings of an existing VM, the Acceleration tab in the System settings is disabled/grayed out.

After some googling around at the wrong corners of the Internet I found this post by vonnie mentioning that maybe on my Windows 8.1 host the feature Hyper-V was enabled. I think this steals the VT-x functionality somehow for usage by itself. Disabling this feature boosted the performance of my VMs dramatically!

To disable Hyper-V in Windows 8.1 go to Turn Windows features on or off via Windows' search functionality (hotkey: Win+Q). You'll have to reboot.

These screenshots have been taken after fixing the problem:vt-x-1 vt-x-2

vt-x-cpuz

Use VIM as git editor on Windows

The following configures git to use VIM as the default editor (e.g. for commit messages) on Windows:
git config --system core.editor 'C:\\PROGRA~2\\Vim\\vim73\\gvim.exe' --wait

Explanation

  • Uses short directory names. You can find these using e.g.:

    dir /X "C:\Program Files (x86)*"

    Notice the star at the end of the command line. This will reveal the short name PROGRA~2
  • Use double backslashes
  • Use single quotes
  • Use the --wait option after closing the single quotes for the path to the VIM editor

My Windows 7 and Windows 8.1 setup

List of things to do after Windows 7 install

+ Bonus: added specials for Windows 8.1

Firefox

  • Old style menu
  • Language: Prefer English: Tools \ Options \ Content
  • Preferences / Privacy / ...Do not track
  • Addons
    • Ghostery
    • Firebug
    • ...

2014-03-29 07_57_50

2014-03-29 08_00_45

Thunderbird

    • Accounts....
    • Copy old mails from %APPDATA%\Thunderbird\Profiles\vdfgdfdfg\...
    • about:config
      • mail.tabs.drawInTitlebar: false
    • Preferences:
      • Security / Web Contents / Tell... do not track
      • Advanced / Reading and Display / Uncheck: Automatically mark messages as read
      • Display / Formatting / Plain Text Messages: Uncheck: Display emoticons as graphics

Clink - Powerful Bash-style command line editing for cmd.exe

PuTTY

Greenshot

  • Change Save folder: D:\Temp\greenshots
  • Destination: Save directly...

Sysinternals Suite

Vim

  • During install: Enable "Create .bat files for command line usage", disable "Native language support"
  • Make GVim the "default". In "CMD (Run as Administrator)"
cd /d C:\windows
ren vim.bat cvim.bat
ren vimdiff.bat cvimdiff.bat
ren vimtutor.bat cvimtutor.bat
copy gvim.bat vim.bat
copy gvimdiff.bat vimdiff.bat

Quick Launch in Task Bar

    • Activate (as in WinXP)
      • Task Bar, right click / Toolbars / New toolbar... / %userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\
    • Add CMD shortcut
      • Change CMD shortcut properties
        • Options / Edit Options / Quick Edit
      • Layout/Screen Buffer Size / Height: 9999
      • Shortcut / Start In: C:\
    • Remove: Internet Explorer, Switch between windows, Show desktop

Libre Office

Cygwin

  • Still setup-x86.exe (not setup-x64.exe)

GIMP

CDex

  • Options / Settings / General / Directories & files
  • Options / Settings / CD Database / Remote freedb / Your E-mail address

Bullzip PDF Printer

 

7-ZIP

Skype

  • No MSN / Bing, etc.
  • No Click to call
  • Settings:
    • Launch at Windows startup?
    • Disable: Skype WiFi
    • Privatsphäre / Microsoft erlauben, personalisierte Anzeigen... -> Disable
    • Advanced / Advanced Settings / Skype in Taskleiste anzeigen: Disable
  • Windows Traybar: Show icon and notifications

TortoiseSVN

TortoiseGit

VirtualBox

CDBurnerXP

  • During install: No Smileys

Visual Studio

Qt

Adobe Reader

IrfanView

  • IrfanView itself
    • Assiciate with extensions: Images only
    • No Chrome browser
  • IrfanView PlugIns

KeePass

Java (needed?)

  • After installation: Configure Java / Advanced / Miscellaneous (bottom) / Suppress sponsor offers when installing or updating Java

VLC

  • During installation: Uncheck: File type association for audio files, Uncheck: Context menu

Code Compare

  • Maybe download via Visual Studio. Menu Tools / Extensions and updates... to avoid registration
  • In Code Compare: Menu Tools / Options / Environment / General: Check Use standalone application from command line by default

WinAmp

Xming

Remote Desktop

  • Allow remote access to your computer

NTFS

  • Change ownership of previously used hard disk drivers via Computer Management / Disk Management / Properties / Security / Advanced / Owner / Edit / Change owner to...

Certificates

  • Manage file encryption certificates / Export

Explorer

  • Tools / Folder options / View:
    • Display full path in title bar
    • Show hidden files,....
    • Uncheck: Hide extensions...
    • Uncheck: Hide protected operating files....

     

GnuWin32

  • Get via GetGnuWin32
    • Destination: D:\TEMP
    • cd /d D:\TEMP\GetGnuWin32
    • download.bat
    • install C:\gnuwin32
    • rd /q /s D:\TEMP\GetGnuWin32
    • append to PATH: C:\gnuwin32\bin
    • ren sort.exe _sort.exe & ren mkdir.exe _mkdir.exe (these are problematik as they do not work as the Windows tools with same name but are expected by e.g. many build scripts)

Environment variables

  • TEMP=D:\TEMP
  • TMP=D:\TEMP

Miscellaneous Additional settings

  • Desktop: Personalize \ Desktop Background \ Solid colors: Black
  • Control panel: View by: Small Icons
  • Date and time: Internet Time: ptbtime1.ptb.de
  • Power Options: Change plan settings / Put computer to sleep: Never
  • Taskbar: Uncheck: Lock the taskbar, Use small icons, Taskbar buttons: Never combine
  • Troubleshooting / Change settings: Off
  • Windows Defender: Tools / Microsoft SpyNet / I don't want to join...
  • Keyboard: Install custom keyboard layout
  • Control Panel\All Control Panel Items\Action Center\Problem Reporting Settings: Never check for solutions
  • Control Panel\All Control Panel Items\Personalization\Window Color and Appearance: Disable transparency
  • Windows Media Player: Custom settings: Everything "Internet": Disable
  • Windows 8.1: Change Search to always launch a new instance. Use registry file from this blog postreghack_win81_search_DesktopAppsAlwaysLaunchNewInstance.regwin81_search
  • Disable changing of keyboard layout with CTRL+SHIFT: go to Settings / Language / Advanced settings / Change language bar hot keys / Between input languages: Change key sequence: Not assigned
  • Disable "Windows is checking for solution" dialog: run "gpedit", change Computer Configuration / Administrative Templates / Windows Components / Windows Error Reporting: Disable Windows Error Reporting -> Enabled