Click here to Skip to main content
16,007,814 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: problem with drawstring somewhere Pin
vbbeg9-Jan-08 22:19
vbbeg9-Jan-08 22:19 
GeneralRe: problem with drawstring somewhere Pin
ChandraRam9-Jan-08 22:23
ChandraRam9-Jan-08 22:23 
GeneralRe: problem with drawstring somewhere Pin
vbbeg9-Jan-08 22:55
vbbeg9-Jan-08 22:55 
QuestionRegistry Access Problem Pin
psgeorge9-Jan-08 7:49
psgeorge9-Jan-08 7:49 
GeneralRe: Registry Access Problem Pin
Dave Kreskowiak9-Jan-08 7:59
mveDave Kreskowiak9-Jan-08 7:59 
GeneralRe: Registry Access Problem Pin
psgeorge10-Jan-08 1:35
psgeorge10-Jan-08 1:35 
QuestionRe: Registry Access Problem Pin
psgeorge11-Jan-08 1:51
psgeorge11-Jan-08 1:51 
GeneralRe: Registry Access Problem Pin
Dave Kreskowiak11-Jan-08 12:15
mveDave Kreskowiak11-Jan-08 12:15 
Your problem is that you're initially opening the subkey with write permissions by supplying the True argument to OpenSubKey:
' Create regSubKey to point to HKEY_LOCAL_MACHINE\Software\Liebert\RegistryTest
regSubKey = regKey.OpenSubKey("Software\Liebert\RegistryTest", True)
' Check if registry SubKey exists
If (regSubKey Is Nothing) Then ' create SubKey

and THEN you're checking to see if anything was returned. When a normal user runs that line of code, it'll fail because the user cannot open the key for write access.

Remove the True argument from that line and it'll run. Of course, you'll have to rewrite the code to find out if the key exists, then try and create the key path and values.



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralRe: Registry Access Problem Pin
psgeorge14-Jan-08 0:18
psgeorge14-Jan-08 0:18 
QuestionDraw a graph in VB.NET Pin
Yatish Kasa9-Jan-08 6:51
Yatish Kasa9-Jan-08 6:51 
GeneralRe: Draw a graph in VB.NET Pin
Dave Kreskowiak9-Jan-08 7:01
mveDave Kreskowiak9-Jan-08 7:01 
Generalwriting function in vb.net Pin
chandra_779-Jan-08 6:18
chandra_779-Jan-08 6:18 
GeneralRe: writing function in vb.net Pin
Dave Kreskowiak9-Jan-08 6:59
mveDave Kreskowiak9-Jan-08 6:59 
GeneralRe: writing function in vb.net Pin
chandra_779-Jan-08 8:02
chandra_779-Jan-08 8:02 
GeneralContract specifications and DLL's and debuggers. Pin
cdansreau9-Jan-08 5:48
cdansreau9-Jan-08 5:48 
GeneralRe: Contract specifications and DLL's and debuggers. Pin
Dave Kreskowiak9-Jan-08 6:55
mveDave Kreskowiak9-Jan-08 6:55 
GeneralRe: Contract specifications and DLL's and debuggers. Pin
cdansreau10-Jan-08 5:34
cdansreau10-Jan-08 5:34 
GeneralRe: Contract specifications and DLL's and debuggers. Pin
Dave Kreskowiak10-Jan-08 13:07
mveDave Kreskowiak10-Jan-08 13:07 
GeneralStill struggling with appdomain Pin
cstrader2329-Jan-08 5:35
cstrader2329-Jan-08 5:35 
GeneralExtract icon from dropdown Pin
cstrader2329-Jan-08 4:33
cstrader2329-Jan-08 4:33 
GeneralRe: Extract icon from dropdown Pin
Dave Kreskowiak9-Jan-08 4:48
mveDave Kreskowiak9-Jan-08 4:48 
GeneralRe: Extract icon from dropdown Pin
cstrader2329-Jan-08 5:30
cstrader2329-Jan-08 5:30 
GeneralRe: Extract icon from dropdown Pin
Dave Kreskowiak9-Jan-08 6:49
mveDave Kreskowiak9-Jan-08 6:49 
QuestionPlease help with Error in VB.Net Code :-( Pin
Support1239-Jan-08 3:13
Support1239-Jan-08 3:13 
GeneralRe: Please help with Error in VB.Net Code :-( Pin
Dave Kreskowiak9-Jan-08 4:19
mveDave Kreskowiak9-Jan-08 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.