Jump to content

Registry in Vista


diluculo

Recommended Posts

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.

Link to comment

QUOTE(diluculo @ Sep 10 2007, 02:49 AM)

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.

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.

Link to comment

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?

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.