Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   Registry Edit (http://www.programmingforums.org/showthread.php?t=14562)

venkatramasamy Nov 22nd, 2007 11:26 PM

Registry Edit
 
Hi,

I use thefollowing code to Disable the UAC in windows Vista through registry access

KeyFound = myReg.UpdateKey(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", "0")

it changes the "EnableLUA" value to "0" but the problem is
it changes the Type REG_DWORD to REG_SZ

i need REG_DWORD type remains the same...

is anybody there to say how to set the Type as REG_DWORD

Thanks in advance

Venkatramasamy SN

Ancient Dragon Nov 29th, 2007 10:15 PM

Re: Registry Edit
 
It appears that UpdateKey is something of your own doing -- I can't find it in any of the VB6 documentation.

venkatramasamy Nov 29th, 2007 10:43 PM

Re: Registry Edit
 
Hello Ancient dragon,
thank you for spending your time here

just tell me your suggestion to update the registry value properly,

Thanks in advance
Venkaramasamy SN

Dameon Nov 29th, 2007 11:27 PM

Re: Registry Edit
 
UpdateKey is possibly overloaded, meaning in this case that the key type will be set as string because the value parameter (0) is a string. Remove the quotes. If that doesn't work, check the documentation for how to supply the type explicitly. However, I'm neither familiar with this function nor can I find any reference to it online, so perhaps it is just some random snippet you found. If so, perhaps you should find a better way to poke the registry.

See here for one option
http://www.thescarms.com/VBasic/WshRegWait.aspx


All times are GMT -5. The time now is 3:35 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC