How to write to the registry in Vista from Access

  • Thread starter Victor Torres Rubio
  • Start date
V

Victor Torres Rubio

Hi... This is my first post and I want to know if there is somewhere a code
to write to the registry. I have one from someone in the past but I try to
use it on Windows Vista and instead of putting the key in the local
machine/software it is adding to some virtual folder. Does anyone knows
why??? Thanks...
 
A

Arvin Meyer [MVP]

This is not really an Access question, but a Vista one. My best guess though
is that you need administrative privileges to write to the registry, and
Vista by default does not let anyway have those privileges without
specifically logging in that way.
 
T

Tony Toews [MVP]

Victor Torres Rubio said:
Hi... This is my first post and I want to know if there is somewhere a code
to write to the registry. I have one from someone in the past but I try to
use it on Windows Vista and instead of putting the key in the local
machine/software it is adding to some virtual folder. Does anyone knows
why???

Regular users can't write/update many portions of the registry. A few
places a regular user will be able to write to.

Vista virtualizes a lot more stuff in both the hard drive and the
registry then previous versions of Windows.

What kind of information are you writing to the registry?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
D

David W. Fenton

What kind of information are you writing to the registry?

This is the key: the only kind of data an Access app should ever
write to the register *after* installation is user-specific data,
and thus will be writable without an administrative logon because
you'd be writing to the CURRENT_USER hive.
 
T

Tony Toews [MVP]

Victor Torres Rubio said:
Hi... This is my first post and I want to know if there is somewhere a code
to write to the registry. I have one from someone in the past but I try to
use it on Windows Vista and instead of putting the key in the local
machine/software it is adding to some virtual folder. Does anyone knows
why??? Thanks...

You emailed me and attempted to email David. I do not respond to
emails from newsgroup posters. Unless, of course, they are going to
offer me significant sums of money. <smile>

To repeat myself and add a bit more information. Administrator
accounts can update anywhere in the registry. As David has stated
users can only update certain portions of the registry but can read
much more.

I had a similar problem with the Auto FE Updater a few years ago. I
was reading the registry but doing so with old code that defaulted to
opening up the registry entry with update privileges. Which I didn't
need to do. A minor change to a parameter calling the API call and
all was well. I had not noticed this problem because I was running as
administrator. And I shouldn't be.

Yes, you could write to some registry in Windows XP and not in Windows
Vista because you and your users were running as administrators in Win
XP. Vista tightens things up much more especially with UAC.

In my strong opinion we developers should not be running as
administrator. And I'm going to change this in my system. Real Soon
Now. TM Jerry Pournelle.

Tony


--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top