You could try exporting the entire key, instead of just the single value you're interested in. Then search for that value in the resulting .reg file to determine whether it exists...
Announcement
Collapse
No announcement yet.
registry issues
Collapse
This topic is closed.
X
X
-
registry issues
Ok - because SF6 does not allow you to determine if a value name exists, I have to use REGEDIT in silent mode to dump the key out to a text file then search for the value name. Well, I am trying to build in some error checking - for example, if the following value (HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\Policies\System\DisableRegistryTools) exists and is 1, then I need to tell the user that they need to either gain admin access or be authorized to use REGEDIT. But since I cannot determine if the value name exists, I get an error, because when you try to read a value, and it doesn't exist, you get an error. The problem lies in the fact that I would like to trap an error if this value name cannot be read at all (because the user may not be permitted to read the registry) but I also need to determine if the valuename exists. Since this is all related to using REGEDIT, I guess SF6 really needs a way to check if a valuename exists, besides the current "if a key exists." If this was the case, I wouldn't have to use REGEDIT at all.
Comment
Comment