Results 1 to 7 of 7

Thread: VB6 - RegOpen - open specified paths in the registry editor

Threaded View

  1. #1

    Thread Starter
    Addicted Member adamm83's Avatar
    Join Date
    Oct 2005
    Toronto, ON, Canada

    VB6 - RegOpen - open specified paths in the registry editor

    Hey ppl,
    I made a nice little vb app that opens paths in the registry editor.

    So lets say you enter:
    it will open regedit to that key.

    It has the ability to run from a dos prompt using parameters. You can also run it from the Run command (Start > Run) or run it manually by opening the exe file and typing the path of the key in the registry.

    --- START EDIT: Added description of functionality: ---
    My code works by editing the LastKey value from the registry located at:
    When opening the Registry Editor, regedit.exe looks for the LastKey value and opens the registry editor to the key in that value. It is sort of like a "Remember the last key opened" function. I based this whole program around that value.

    First, the program changes the LastKey value in the registry using the specified path. Then it checks if regedit.exe is open/running. If so, it closes regedit.exe and re-runs regedit.exe. Since the LastKey value was changed to the specified key, regedit will now open, showing that key! Very simple, yet effective.
    --- END EDIT ---

    I found that I needed the function very often and regedit does not have it. All I do is put the exe in the C:\WINDOWS directory (right next to regedit.exe). This way I don't have to enter the path of the executable when I want to run it from the Run menu. It's very convenient and compact and the UI only shows when you want it to show (when you double click the exe, or when you run regopen without any parameters). I have applied XP styles directly to the compiled program. There is no extra .res file, bc it is compiled right into the exe.

    I hope this is as much use to you as it is to me. The source is included. There are no extra components needed, just a few scripting references (which you should have on your computers already):

    Windows Script Host Object Model
    Microsoft Scripting Runtime
    Microsoft WMI Scripting V1.2 Library



    RegOpen v1.01
    Attached Files Attached Files
    Last edited by adamm83; Feb 24th, 2007 at 03:08 PM.
    ACM Designs

    RegOpen - Open registry keys in Regedit quick & easily

    "A man who tries to catch two rabbits at the same time will catch neither."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width