Monthly Archives: March 2016

How to record Windows desktop with FFmpeg

It is desirable to record the desktop when automation is running unattended. When a test failed, the recording can be used for investigation. The easiest way to do that is to use FFmpeg. On Windows the recording can be started with the following command.

The recording is saved to the file named output.mp4. If there are… Read More »

How to parse WMIC output with Python

The Windows Management Instrumentation Command-line (WMIC) is a command-line and scripting interface for Windows Management Instrumentation (WMI). For example, if you are interested in getting Caption, Description, and Vendor of Python installed. Simply run the following command.

The output will be similar to below:

The first line is the headers, and is followed… Read More »

How to set an environment variable to the local IP address in Windows

This is a simple command batch to get the local IP address from ipconfig command.

The first line is to extract IP address from ipconfig command. The second line is just to trim the leading white space. To run the command line directly in a command prompt, remember to change %%i to %i.