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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32 Registry SubKeys

Status
Not open for further replies.

skar

MIS
Mar 21, 2001
37
GB
Hi all,

I'm trying to get a KEY value from the registry. Now I can get your everyday values using this method:

Code:
$platform = $Registry->{"//$_/HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/ProductName"};

But I want to get a KEY value and I'm having problems. I've been using TieRegistry and you can drop all SubKeyNames into an array. I can then pick out the one I want and bin the others. But I cant get my head around the syntax.

This is where I'm up to and its erroring "Can't call method "SubKeyNames" on an undefined value"
Code:
$bekey = $Registry->{"//$_/HKEY_LOCAL_MACHINE/SOFTWARE/VERITAS/Backup Exec"};
	@beversion = $bekey->SubKeyNames;

What I'm doing is getting the version of Backup Exec from the Registry as its kept in a KEY value. Which is a pity as I can get all the other value types... ARGH!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top