Solved

how to open regedit and show key

Posted on 2000-04-09
6
338 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
ID: 2699026
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
ID: 2699045
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
ID: 2699294
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
ID: 2701115
"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
ID: 2703271
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
ID: 2706728
  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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

22 Experts available now in Live!

Get 1:1 Help Now