You are browsing the archive for Windows.

by Steven

Hide a hard drive from My Computer

June 8, 2011 in Hacks, Windows

Here's a little privacy hack for users running Windows XP. If you have a hard drive with some kind of mildly sensitive information on it, then you can stop it appearing in My Computer but you'll still be able to access it by installing a utility that Microsoft created, Tweak UI. It allows you to tweak many smaller settings which don't feature in any of the standard Windows preference menus. One such option is to control which drives appear when you open up My Computer and which don't.

TweakUI

Once you've installed Tweak UI then you have to find and expand the My Computer node in the tree menu on the left, then select Drives. Once you've done that, then you'll be shown drives A to Z (even if they're not actually drives you have - if you later install a hard drive W: then the setting here will determine if it is shown then), each with a check box next to it. Uncheck the drives that you don't want to be shown. To access the drive once you've done that then you'll need to enter the drive letter, eg C: in the address bar of Windows Explorer.
I should point out that this isn't a secure solution - it doesn't do anyone to actually stop anyone accessing information on the drive, however it can be useful to prevent friends and coworkers stumbling upon information you'd rather they don't see.

Although I've mentioned that this is a privacy tip, that's not what I use it for. I have a dual boot set up with another version of Windows, though XP is my main one, and the drive from that other install shows up in My Computer. I use Tweak UI to get rid of the drive letter there, purely for tidiness. I know I could just remove the drive from that version of Windows through the Administrative Tools in the Control Panel, but it is sometimes convenient to have access to it so I use this method. Tweak UI is good at resolving small annoyances such as that.

How To: Redirect Output on the Windows Command Line

April 3, 2011 in Tips, Windows

This tip will show you how to write the output of a command at the Windows command line to a file. It's not hard (infact it's one of the very basics of command line programming).

Start Command Line within Windows by choosing Start->Run then entering 'cmd' and pressing enter.

Suppose you want to capture the output from a directory listing, say c:blah. To get the directory listing to display on the screen you would type the command dir c:blah which may generate the output:

C:\>dir c:\blah

Volume in drive C is Windows
Volume Serial Number is XXXX-YYYY

Directory of c:\blah

07/01/2006 21:08 <DIR> .
07/01/2006 21:08 <DIR> ..
07/01/2006 21:07 <DIR> folder1
07/01/2006 21:07 <DIR> folder2
06/03/2005 11:58 5,442,634 music.mp3
07/01/2006 21:07 17 text1.txt
2 File(s) 5,442,651 bytes
4 Dir(s) 12,453,460,480 bytes free

If you want to capture this listing to the file c:folder.txt then you would append > c:\folder.txt to the original command, ie:
C:\>dir c:\blah > c:\folder.txt

Notice now that nothing appears on the command line window after this and it simply moves on to the next prompt. If we now check the file c:\folder.txt then we see that it has the contents of the directory.

A slight variant of this is to use the greater than symbol, >, twice, ie:

C:\>dir c:\blah >> c:\folder.txt

This will append the output of the dir command to what is already contained in the file c:\folder.txt.

List all processes with the Windows Command Line

April 2, 2011 in Tips, Windows

To view all the currently running processes in windows from the command line (choose Run then type "cmd"), you can use the command 'tasklist'. The output will look something like this:
C:>tasklist

Image Name               PID Session Name     Session#    Mem Usage
===================== ====== ================ ======== ============
System Idle Process        0 Console                 0         16 K
System                     4 Console                 0         52 K
smss.exe                 592 Console                 0        108 K
csrss.exe                648 Console                 0      5,868 K
winlogon.exe             680 Console                 0      2,632 K
services.exe             724 Console                 0      2,376 K
(...)

Kill a Process from the Windows Command Line

April 2, 2011 in Tips, Windows

To terminate a process from the command line of windows, use the taskkill command:
When you know the name of the program to stop:
taskkill /IM notepad.exe
Or when you know the process ID, eg 784:
taskkill /PID 784
For more usage variants, type taskkill /?

Some of this information about what processes are running can be obtained by the tasklist command, e.g. this tells you the Process ID (PID).

How To: Control the Mouse Pointer Without a Mouse in Windows 7

April 1, 2011 in Tips, Windows

If you want to control your mouse pointer with the keyboard, Windows XP provides a way:

Press Alt+Left Shift+Num Lock all at once and a prompt will appear telling you that you have activated mousekeys, select ok then you can control the mouse with the numpad.

The controls are:
1,2,3,4,6,7,8,9 = move the mouse
5 = mouse button click
+ = double click
insert = hold down mouse button
delete = release mouse button (after holding it down with insert)
/, * or - = select which mouse button the above controls will click (left, both or right respectively)
numlock = disable mousekeys