jon parise // friday, october 20, 2017

Windows Stuff

  1. Open Command Prompt From Explorer
  2. Windows XP System Restore Points

Open Command Prompt From Explorer link

The ability to open a Command Prompt from the Windows Explorer interface is quite useful. The following Registry addition will add a new "Command Prompt" entry to the context menu that is displayed when a folder is "right-clicked" in the Explorer interface.

Copy the following text verbatim into a new file named command.reg. Then, double-click the file and agree to have its contents added to the Registry.

Contents of command.reg
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Command]
@="Command &Prompt"

[HKEY_CLASSES_ROOT\Directory\shell\Command\command]
@="cmd.exe /k \"cd %L\""

Microsoft demonstrates a similar method here.

Windows XP System Restore Points link

Windows XP introduced a handy feature called "system restore points". I find it useful to create restore points before performing large system upgrades or changes.

A restore point can be created manually by following the following steps:

  1. Single-click Start and point to All Programs.
  2. Mouse over Accessories, then System Tools, and select System Restore.
  3. In the System Restore wizard, select the box next the text labeled "Create a restore point" and click the Next button.
  4. Type a description for your new restore point. Something like "Before I installed some program that may cause my system major grief" would do just fine, but you don't have to be that descriptive.
  5. Click Create.

Alternately, the following script can be used to create a system rstore point.

Contents of restore.vbs
'Unattended System Restore Point
'sysrestorepoint.vbs
' Doug Knox - rev 02/06/2002
'This code may be freely distributed/modified
'Downloaded from www.dougknox.com
'Extracted from original code by Bill James - www.billsway.com

Set sr = getobject("winmgmts:\\.\root\default:Systemrestore")

msg = "New Restore Point successfully created." & vbCR
msg = msg & "It is listed as: " & vbCR
msg = msg & "Automatic Restore Point " & Date & " " & Time

If (sr.createrestorepoint("Automatic Restore Point", 0, 100)) = 0 Then
    MsgBox msg
Else
    MsgBox "Restore Point creation Failed!"
End If

Set sr = Nothing