Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / May 2008

Tip: Looking for answers? Try searching our database.

write to registry in vb.net and vista

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sd - 09 May 2008 13:14 GMT
hello
I need to keep my app entry under HKEY_LOCAL_MACHINE\Software\MyApp.
(to support for all users).I need to update one key under MYApp.
When I attempt to set value for this key
My.Computer.Registry.LocalMachine.CreateSubKey("software
\MyApp").SetValue("Licence", "Success")

I get error stating Access to HKEY_LOCAL_MACHINE\Software\MYapp denied
for Vista only.For XP no problem.If for Vista I give full control to
Myapp reg folder ,everything works fine.Is it possible to create the
registry key with full controls permission in vb.net? or is there any
other way to solve this problem through vb.net.I don't want to give
permissions manually on reg key.
Thanks
cfps.Christian - 09 May 2008 14:11 GMT
I'd say your best way to accomplish this is to find some way to not
write to the registry.  Vista's security makes it rough to write to
the registry.  I know we had an app that had to be installed on a
regular user machine but because of all the registry writing we had to
give the user administrator rights which is a huge no-no.
David Anton - 09 May 2008 14:31 GMT
If you limit writing to HKEY_LOCAL_USER, then you'll be fine.  It's probably
easier to modify your app to write separately per user than to switch to
using files.
Signature

http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
Java to VB & C#
Instant C#: convert VB to C#
Instant VB: convert C# to VB
Instant C++: VB, C#, or Java to C++/CLI

> I'd say your best way to accomplish this is to find some way to not
> write to the registry.  Vista's security makes it rough to write to
> the registry.  I know we had an app that had to be installed on a
> regular user machine but because of all the registry writing we had to
> give the user administrator rights which is a huge no-no.
Family Tree Mike - 09 May 2008 15:13 GMT
I wouldn't expect you to have problems if this were run as a part of a custom
action in a setup project.  It appears though you are trying to set this as
the application is run by individual users.  Maybe your example is just to
help explain it, but wouldn't the license only need checking at install, and
from then on the install is considered valid?  Perhaps you are implimenting a
license expiration date.  If so, that could just be handled in code without
registry modification.

> hello
> I need to keep my app entry under HKEY_LOCAL_MACHINE\Software\MyApp.
[quoted text clipped - 10 lines]
> permissions manually on reg key.
> Thanks
Tony K - 09 May 2008 20:07 GMT
I had the same problem a while back with my app.  Is this app installed on a
computer that is part of a domain?  I found that some of the users on the
computer couldn't run the app as well because they were not added to the
machine as a domain user but a local user only.  Our IT Admin had to add
everyone as a domain user.  I hope that makes sense.

Tony K.

> hello
> I need to keep my app entry under HKEY_LOCAL_MACHINE\Software\MyApp.
[quoted text clipped - 10 lines]
> permissions manually on reg key.
> Thanks

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.