Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having troubles with registry 1

Status
Not open for further replies.

timgerr

IS-IT--Management
Jan 22, 2004
364
US
I am trying to connect to a remote registry and list all the file under a folder (for lack of a better term).
This is what I want to do,
1. connect to another computer.
2 list all the folders from HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Updates\\WindowsXP\\SP2

I want to see what the names of the folders are. I have scripts that can read the keys but not the folders. I am new to Perl and have had success in the past. If you could steer me in the right direction, I thank you.

Timgerr


-How important does a person have to be before they are considered assissinated instead of just murdered?

 
I don't really mess with Windows' registry files, but take a look at the module Win32::TieRegistry. This module will put your registry into tied hashes for export.

- Rieekan
 
Thanks for the response, I have looked at that and it will not give me the folders, just the keys.

Timgerr

-How important does a person have to be before they are considered assissinated instead of just murdered?

 
I know it is not your answer in perl, but why not use reg.exe from the windows resource kit.

@QUERY = `reg query HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Updates\\WindowsXP\\SP2`;
 
I had to do this with WMI FYI here is the code.
Code:
$Class = "WinMgmts:{impersonationLevel=impersonate}//timothyg-02/root/cimv2";
	$Wmi = Win32::OLE->GetObject($Class);
	@Registry = in $Wmi->ExecQuery("SELECT * FROM Win32_QuickFixEngineering");
timgerr

-How important does a person have to be before they are considered assissinated instead of just murdered?

 
* for leaving an answer back
--Paul

Nancy Griffith - songstress extraordinaire,
and composer of the snipers anthem "From a distance ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top