Solved

how to open regedit and show key

Posted on 2000-04-09
6
337 Views
Last Modified: 2010-04-04
  How can I open regedit.exe and have it show a key from my program?  I can open regedit.exe by simply running it, but I also want it to show a certain key, for example, HKEY_CLASSES_ROOT\.bat.
   I assume that there must be parameters that can be passed with regedit.exe to do this, but I have experimented with different switches and have found nothing that works.
   Fix-It Utilities 2000 by Ontrack does this and I have heard that other programs also do this, so it can be done.
   How?
0
Comment
Question by:RayGeide
6 Comments
 
LVL 1

Expert Comment

by:new_x
Comment Utility
I do not know how to supply arguments to regedit.exe. But instead of running regedit.exe and showing key info, you can show this info within your program by using registry functions without need to run regedit.exe

Regards,
0
 

Author Comment

by:RayGeide
Comment Utility
Yes, I am well aware of that.
I am writing a program that will work with the registry and a user has asked that I provide with it the ability to open regedit so that the user can see where the key is and what is in it, before deleting it.  He mentioned that the program that he is using opens regedit and shows the key.  I have Fix-It Utilities and it also does this.  I want to be able to do this in my program.
0
 
LVL 2

Expert Comment

by:Serega
Comment Utility
All known regedit command line options:
regedit.exe [options] [filename]
filename      Import .reg file into the registry    
/s            Don't display dialog box when importing .reg files
/e            Export registry file
              e.g. regedit /e filename.reg HKEY_LOCAL_MACHINE\SYSTEM
/L:system     Specify the location of the system.dat to use
/R:user       Specify the location of the user.dat to use
/C            Compress [filename] (Windows 98)

I think, Fix-It Utilities 2000 install their own regedit utility, that look like windows regedit (most probably instead of it) and then start it with specific parameters. You can find links to alternative regedits at www.regedit.com.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
Comment Utility
"regmon" from http://www.sysinternals.com
can do this without using extra parameters or installing its own regedit ..
the source code for regmon is available at same site.
(unfortunatly it was wrote in c )
0
 
LVL 1

Expert Comment

by:nrico
Comment Utility
There are some magic things in Windoze that are called DDE and OLE. I can't even begin to think or understand what they mean, but it comes down to the principle that any program can call, start, give orderds and share information with another program that supports this.

So I guess that must be what your Fix-It does. Sorry I can't say anyting constructive though.
0
 

Author Comment

by:RayGeide
Comment Utility
  I knew about the commandline options and I had already determined that Fix-It was actually running regedit.exe and not just immitating it.
   I took a look at regmon which does the same thing as Fix-It (just slower).  So I looked at the source code and saw that it was indeed running regedit.exe, setting the focus to it, and entering keystrokes to get to the proper key.  I rewrote the C code to Delphi and after some more fiddling was able to do it.  Thanks inthe for pointing me in the right direction.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now