vb.net - RegOpenKeyEx returns 2 when accessing wow6432node -


i try read uninstall keys registry using vb.net 2010. want know modify date of key, have use advapi32.dll functions. on local system key , modify dates can read, on remote registry not if key located under wow6432node. althought set key_query_value key_wow64_32key.

here's code:

dim subkey string = "software\microsoft\windows\currentversion\uninstall" dim hremotekey intptr dim regkeyptr integer = regconnectregistry(tbservername.text, new intptr(registryhive.localmachine), hremotekey)  dim key_query_value integer = 1 + 512  dim openregkeyresult integer = regopenkeyex(hkey_local_machine, subkey, 0, key_query_value, regkeyptr) dim lpftlastwritetime system.runtime.interopservices.comtypes.filetime dim returnvalue integer = regqueryinfokey( _ regkeyptr, _ nothing, _ nothing, _ nothing, _ nothing, _ nothing, _ nothing, _ nothing, _ nothing, _ nothing, _ nothing, _ lpftlastwritetime) 


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -