diluculo Posted September 11, 2007 Report Share Posted September 11, 2007 Hi Does anybody know how to avoid the registry problem in Windows Vista? My project is writing and reading some my own registry keys. However, I find that it can't create/write keys in run-time mode in Vista. As far as I understand, such actions are allowed only in install time in Vista. I know that LabView application builder supports to create a registry key with new values. When it already exists, is there any way to make it unchanged? I want to know how to programmatically handle(create/write) registry in Windows Vista. Quote Link to comment
Val Brown Posted September 11, 2007 Report Share Posted September 11, 2007 QUOTE(diluculo @ Sep 10 2007, 02:49 AM) HiDoes anybody know how to avoid the registry problem in Windows Vista? My project is writing and reading some my own registry keys. However, I find that it can't create/write keys in run-time mode in Vista. As far as I understand, such actions are allowed only in install time in Vista. I know that LabView application builder supports to create a registry key with new values. When it already exists, is there any way to make it unchanged? I want to know how to programmatically handle(create/write) registry in Windows Vista. You can read and write to the Registry in Vista, you just can't write EVERYWHERE like used to be possible in XP. Program Files, the Windows path -- all the really "yummy" places are a No-No unless you're an installer routine that has been elevated, or if you're running as Administrator (which is a REALLY BAD idea). There was a presentation at NI Week where a lot of this was introduced. It might be a good starting point for you. Quote Link to comment
diluculo Posted September 13, 2007 Author Report Share Posted September 13, 2007 QUOTE(Val Brown @ Sep 10 2007, 07:07 PM) You can read and write to the Registry in Vista, you just can't write EVERYWHERE like used to be possible in XP. Program Files, the Windows path -- all the really "yummy" places are a No-No unless you're an installer routine that has been elevated, or if you're running as Administrator (which is a REALLY BAD idea).There was a presentation at NI Week where a lot of this was introduced. It might be a good starting point for you. Thanks for your advice. In fact, I would like to know how other developers handle this issue. Instead of modifying to the registry keys, how about recording necessary inofrmation to a configuration file that does not locate in the restricted path? Quote Link to comment
Val Brown Posted September 13, 2007 Report Share Posted September 13, 2007 Absolutely, I generally use the Configuration VIs to read/write to standard format INI files for data that should persist for each launch of an application. It's importnat to remember thought that such INI files will need be able to be accessed using default "read/write" permission in Vista in protected paths, such as <WINDOWA>, <PROGRAM FILES>, etc. Such data should be placed in <USER NAME> dependant locations of other non-UAC protected paths on Vista systems. I actually also use the Registry read/write VIs for data that should persist for the appliction itself, so "intallation" information. So it really depends on what kind of information you're concerned about. And, as always, there are some good examples included in the LV documentation. I also suspect that OpenG has good tools for these purposes but I don't know anything more specific about what is available there. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.