Solved

how to open regedit and show key

Posted on 2000-04-09
6
341 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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