Sunday, 29 June 2008

Recording Internet Audio

Just downloaded the open-source program Audacity 1.2.6. I'm trying to export some recorded audio a) in WAV format (which warns me my tracks will be mixed down to a single mono channel) and MP3 (which requires lame_enc.dll - LAME being an MP3 encoder licensed under LGPL, see lame.sourceforge.net for more details). I haven't looked at the source code but Audacity just seems to record the noise from your speakers. If you redirect the audio output Audacity gets confused. There might be a way to configure this properly but it's not obvious.

Saturday, 28 June 2008

Free Antivirus

I've been using EZ Antivirus from CA for a while and my license expired. Result? -lots of annoying dialog boxes.

Tip 1

Rather than renew I switched to the more easy-to-use and free-for-non-commerical-use program AVG (free.grisoft.com). Unlike EZ, AVG does the noble thing and adds itself to Windows "Add/Remove Programs" so you can uninstall it easily later if you wish (EZ Antivirus requires you to run the program unvet32.exe but it does a decent job removing registry entries, services etc). Word of warning - AVG's exe is 47 MB and may take you a while to download.

Tip 2

I  had to disable the LinkScanner which is a cool feature but was slowing down my web browsing I also had to disable 404 redirection in the browser.

Tip 3

If you have a scheduled scan there it doesn't ask you e.g. if you want to scan now or delay or reschedule the scan by 1 hour. This is a pain since it can be hard to interrupt a scan in progress. To deal with this, ensure the scan is set to take place at a time which will cause minimum disruption to you e.g. 2am.

There is also Avast! now which gives away anti-rootkit (a paid option with AVG).

Wednesday, 25 June 2008

Crontab style Scheduling in Windows using Python

Here is one approach to crontab-style scheduling in Windows:

http://www.kalab.com/freeware/pycron/pycron.htm

Another would be to use UNIX emulation with cygwin. Hmm...I wonder how pycron works. What benefits does it offer over scheduled tasks in the Windows environment?

Querying the Task Manager Quickly

Doing Cntrl-Alt-Del and running Task Manager is a time-consuming process. Instead, the tasklist command can be used to get a list of running tasks.

For example, if you want to get a list of tasks taking up more than 50Megs in memory then use the "FI" (filter) parameter with tasklist as follows:

tasklist /FI "MEMUSAGE gt 50000"

An easy mistake to make is to type ">" rather than "gt". This will not work. It will give you an error: "ERROR: The search filter cannot be recognised".

On my system this returns just one process:

Image Name PID Session Name Session# Mem Usage
firefox.exe 3120 Console 0 70,116 K

There don't appear to be any built-in sorting functions based on memory or CPU usage, but this is easy to program by parsing the output of tasklist.exe in Python, Perl or some other scripting language. You will need to use tasklist /V (for verbose mode) to see CPU usage information.

Manage Shortcuts in Start Menu using cmd.exe

Shortcuts in Start Menu can be easily accessed via two locations in cmd.exe:

C:\Documents and Settings\All Users\Start Menu
C:\Documents and Settings\Your User\Start Menu

This is useful e.g. if you want to quickly delete a shortcut, or duplicate shortcuts:

del "Windows Media Player (2).lnk"


Doing the same operation by right clicking and pressing delete can take up to 5s compared with less than 1s using the command-line.

Wednesday, 18 June 2008

Monday, 16 June 2008

Quick Cut and Paste in a Command Window

You need to copy a region of the command window but you can't select what you want. You just need to use the right mouse button to cut and paste.

1. Right click -> Select Mark
2. Right click to copy
3. Right click to paste

Easy.

Improve CPU Performance using msconfig

Start->Run->msconfig This nifty utility allows you to disable programs and services that run on Windows startup. One example is realsched.exe, a RealPlayer update-checker that runs out of C:\Program Files\Common Files\Real\Update_OB directory.

Control the Windows Control Panel

In order to edit your environment variables in Windows really fast, you need control over the applets in Control Panel.

Copy the following code and stick in sys.bat

start C:\WINDOWS\system32\sysdm.cpl

Save sys.bat to your bin directory, e.g. C:\bin\sys.bat. Now you can access System Properties quickly.

Howdy

Howdy, Welcome to the blog of Windows Joe - your dedicated guide to Windows PC maintenance!