Here's a sample code:
This code checks the registery for a key and outputs class id, then that class id needs to be exported to the UnRegister function.
szKey = "SOFTWARE\\Classes\\Software\\myapp\\Games\\";
if (RegDBKeyExist (szKey + "Game Name") ) then
nResult = RegDBGetKeyValueEx ( szKey + "Game Name", szName, nvType, svValue , nvSize );
UnRegister();
endif;
And the UnRegister fucntion loads the class id and unregisters the key itself.
szKey = "SOFTWARE\\Classes\\CLSID\\";
szKey2 = "\\InprocServer32";
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
nResult = RegDBGetKeyValueEx ( szKey + svValue + szKey2, szName, nvType, svValue , nvSize );
LaunchAppAndWait ( "regsvr32.exe","/u /s " + svValue , WAIT);
I hope anyone out there can help me out with this one.
Regards,
Toby