Solved

how to open regedit and show key

Posted on 2000-04-09
6
340 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

772 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