Hi all,
I'm trying to access the Windows Registry through java using the ice registry package com.ice.jni.registry.
I'm getting this error:
*com.ice.jni.registry.RegistryException: Registry API Error 6, 'invalid handle' -
'RegQueryValueEx()'*
My code is as follows:
import java.util.*;
import com.ice.jni.registry.*;
class regSearch
{
public static void main(String[] s)
{
System.loadLibrary("ICE_JNIRegistry");
RegistryKey oRegKey = new RegistryKey(4,
"\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Management\\ARPCache");
//"\\HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall");
String str = oRegKey.getFullName();
System.out.println(str);
try
{
System.out.println(oRegKey.hasDefaultValue());
//Enumeration keyElements = oRegKey.keyElements();
// System.out.println(keyElements.nextElement());
}
catch (RegistryException e)
{
// TODO Auto-generated catch block
System.out.println("You are getting an error: \n"+e);
}
}
}
I'm trying to fetch information about softwares that are currently installed on the PC. But I'm getting this error right now..so I can't go ahead. Please help me for the same..I've got to finish this by today..
Thanx in advance,
Rave.