Thanks, sirbounty :) For some reason, the regPerm.IsUnrestricted always returns "false" although the mentioned key is writable (tried using regedit.exe). I've tested with different branches also.
Perhaps I should try to write and then catch the exception. In that case, I'm wondering how to proceed to the next statement (in the try block) after an exception occurs in the previous line.
Main Topics
Browse All Topics





by: sirbountyPosted on 2006-12-13 at 08:37:57ID: 18131882
Hey sramesh2k!
/en-us/lib rary/ syste m.security .permissio ns.registr ypermissio n.aspx
\YourArea" yPermissio nAccess.Wr ite, strKey)
I found this: http://msdn2.microsoft.com
which gives some good detail on registrypermission's.
You could use something like:
Dim strKey As String="HKEY_LOCAL_MACHINE
Dim RegPerm as New RegistryPermission(Registr
If regPerm.IsUnrestricted Then
'Process your changes here...
Hope that helps! (God knows you've helped me enough - lol)