Wednesday, 16 September 2015

50 most useful Command Prompt commands. Part 5

50 most useful Command Prompt commands. Part 5

In the final part of our series, Jane Hoskyn reveals 10 commands for keeping your PC safe from hackers

41 Access your user info


The ‘cmdkey’ command, when used with certain parameters, lets you check usernames, passwords and other credentials stored on your PC (Windows Vista and later).


First (and this applies to most commands), you’ll have to run the Command Prompt in administrator mode. Type cmd into Start, right-click Command Prompt (or ‘cmd.exe’) in the list of results and click ‘Run as administrator’. The window will open as usual, with the prompt at C:\WINDOWS\system32, which gives you much deeper access to your system than the ‘User’ location in non-administrator mode.

Type cmdkey at the prompt and press Enter, and you’ll see an explanation of its job and a few examples of parameters. You can find a more comprehensive list of cmdkey parameters on Microsoft’s TechNet site.

42 Find your programs’ licence keys


If you need to find the licence key for an installed program – for example, a program you’ve already bought and want to install in Windows 10 without having to cough up for it again – use cmdkey with the ‘/list’ parameter.

Type cmdkey /list (including the space), then press Enter. The window will immediately reveal key information about some of your installed licenced software, such as Microsoft Outlook and Adobe Photoshop, including full licence keys and the email address you registered the software under.

43 Create a credential


Cmdkey lets you create new programspecific credentials based on usernames and passwords. You’ll need to include the name of the program in question, along with the parameters ‘/add:targetname’ (where ‘targetname’ is the program you’re trying to create credentials for). This may require a spot of trial and error before the Command Prompt recognises the program, but it’ll work eventually, promise (unless you’re using XP or earlier) – and typing cmdkey /list will give you some useful examples.

44 Create a username


Add the parameter ‘/user:username’ (where ‘username’ is whatever you want your username to be) after ‘cmdkey /add:targetname’ to create a new username for your newly created credential. So you’d type cmdkey /add:targetname /user:username then press Enter.

45 Create a password


Same as above, but with the parameter ‘/pass:password’ at the end, where ‘password is your chosen password (which should definitely not be ‘password’!) So you’d type cmdkey /add:targetname /user:username /pass:password and then press Enter.

46 Restore security settings


Windows security settings can easily be messed up by accident or by a malware infection. Your saviour is the ‘secedit’ (security edit) command, which instantly restores your chosen security settings.

Typing secedit alone simply reveals available parameters. The first, ‘/configure’, lets you restore settings to a certain configuration – but that assumes you know the configuration. As ever, Microsoft’s TechNet site can help you here (www.snipca.com/17759).

47 Restore default security settings


The simplest way to use ‘secedit’ is to add a string of characters that restore your PC’s default security settings, rather than your own customised configuration. Carefully type secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose and then press Enter.

48 Check your router


The ‘mrinfo’ command may sound like one of Roger Hargreaves’ more knowledgeable Mr Men characters, but it’s all about router security. Type mrinfo to see a list of parameters for checking your router’s usage, status and IP information.

49 Check your Wi-Fi


The ‘net’ command lets you configure your Wi-Fi settings and check who’s using it – including uninvited Wi-Fi hitchers. There are dozens of parameters for this command, including ‘/account’, which lets you control your password.

50 Fight the evil Empire


We’ve saved the best for last: watch Star Wars in ASCII using the obscure built-in network tool Telnet, which integrates with the Command Prompt. There are several steps involved and we’re out of space, so follow instructions for your Windows version on the excellent social site Quora.