If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Writing in HKEY_LOCAL_MACHINE...Access is denied

Hi Michael,

This piece of code is extracted from a multiuser enterprise system I've developed
and later on completed with lots of comments for educational purpose. Running
the enterprise app from the guest account was never the case and I honestly
have to tell I've never tried this code on that account. Anyway it works
with any of the created useraccount granted rights to the LAN (but not to
the admin group).

I guess the possibilities for the guest account by nature must be quite limited
when it comes to making changes to the system. When I put this code together
I recall I was trying those rights flags from 'bottom to top' to see what
happened. When it worked as desired I didn't put any more efforts to it (!).

About the messagebox, -Feel free to modify the code to suit your needs. My
ordinary module has the optional boolean argument 'NoErrMsg' in some functions
to control the appearance of error messages.

Re: Writing in HKEY_LOCAL_MACHINE...Access is denied

Hi Michael,

This piece of code is extracted from a multiuser enterprise system I've developed
and later on completed with lots of comments for educational purpose. Running
the enterprise app from the guest account was never the case and I honestly
have to tell I've never tried this code on that account. Anyway it works
with any of the created useraccount granted rights to the LAN (but not to
the admin group).

I guess the possibilities for the guest account by nature must be quite limited
when it comes to making changes to the system. When I put this code together
I recall I was trying those rights flags from 'bottom to top' to see what
happened. When it worked as desired I didn't put any more efforts to it (!).

About the messagebox, -Feel free to modify the code to suit your needs. My
ordinary module has the optional boolean argument 'NoErrMsg' in some functions
to control the appearance of error messages.

Re: Writing in HKEY_LOCAL_MACHINE...Access is denied

Bernie,

OK, i'll try it again on a user account.
> About the messagebox, -Feel free to modify the code to suit your needs. My
> ordinary module has the optional boolean argument 'NoErrMsg' in some
functions
> to control the appearance of error messages.

I can change the code easily to suit my needs, but that was not the point.
The messageboxes should be changed to err.raise. This gives several
advantages

-It's the default VB behaviour (if a registry dll was released with VB it
would raise errors)
-It gives the programmer using your class the ability to do what they want
with the error, either ignore it, show a message or take some other action
-If the current code is used in ASP it will cause huge problems.

Re: Writing in HKEY_LOCAL_MACHINE...Access is denied

Bernie,

OK, i'll try it again on a user account.
> About the messagebox, -Feel free to modify the code to suit your needs. My
> ordinary module has the optional boolean argument 'NoErrMsg' in some
functions
> to control the appearance of error messages.

I can change the code easily to suit my needs, but that was not the point.
The messageboxes should be changed to err.raise. This gives several
advantages

-It's the default VB behaviour (if a registry dll was released with VB it
would raise errors)
-It gives the programmer using your class the ability to do what they want
with the error, either ignore it, show a message or take some other action
-If the current code is used in ASP it will cause huge problems.