Troubleshooting: Manipulating the Registry (Visual Basic)

In working with the registry, you may encounter specific exceptions. This topic lists the most common exceptions and provides suggestions on how to address each of them.

Exceptions

The following table lists exceptions that may occur while working with the registry and provides tips on how to address them.

Exception

Suggestion

ArgumentException

Make sure the key you are performing an operation on exists, and that the path you have supplied is both correct and not over 255 characters.

SecurityException

Make sure you have read and write permissions from RegistryPermissionAccess.

UnauthorizedAccessException

Make sure the key was opened for writing if attempting to write to it.

See Also

Reference

RegistryProxy

Concepts

Common Registry Tasks (Visual Basic)

Reading from and Writing to the Registry Using My (Visual Basic)

Reading from and Writing to the Registry Using the Microsoft.Win32 Namespace (Visual Basic)

Security and the Registry (Visual Basic)