DeleteSetting

SIMIN

Regular
Joined
Mar 10, 2008
Messages
92
Hello,
I use DeleteSetting to delete some application registry entries
Visual Basic:
DeleteSetting("MyApp", "Section")
It works well if the registry entry exists, but if not exist it will throw and exception, I catch it, but I want to prevent it from being thrown.
How can I check if this entry does not exist then don't run this code?
Thank you friends :)
 
You could try to read the setting if you get a null response, then you dont need to delete it.

However, trying to do a read if the registry key doesn't exist may throw an exception as well, I'm not sure I haven't used those methods.
 
Back
Top