/* Java application for Win32 using WFC classes; Accesses HKCR\CLSID\ GUID subkeys and enumerates all keys with existing subkeys ProgID and prints default values for ProgID and InProcServer32 M. Gallant 12/30/2000 */ import com.ms.wfc.app.Registry; import com.ms.wfc.app.RegistryKey; public class GetProgIDs { public static void main(String args[]) { int guidcount = 0; // number of GUID subkey values in HKCR\CLSID subkey. String subkeypath = "CLSID"; RegistryKey certroot = Registry.CLASSES_ROOT.getSubKey(subkeypath, true) ; // read only for safety RegistryKey guidsubkey = null; if(certroot==null){ System.out.println("No HKCR\\CLSID Key"); return; } if((guidcount=certroot.getSubKeyCount())==0){ System.out.println("No GUID values in HKCR\\CLSID Key"); return; } System.out.println("----- HKCR\\CLSID\\[guid] keys with ProgID Subkeys ------ \r\n"); String[] guidkeys = certroot.getSubKeyNames() ; for(int j=0; j