Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Writing to Registry with Vista

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,64575
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Writing to Registry with Vista
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Writing to Registry with Vista - 9/25/2008 10:57:53 AM   
  blazted

 

Posts: 18
Score: 0
Joined: 2/6/2006
Status: offline
I have a script where I write a reg key to the HKLM with XP. It is the basic standard script similar to this.


      

But when I try to write to Vista it never writes the key. Nothing happens, no error message anything.
Is there something different with Vista to write to HKLM? I can write to the HKLU user fine but not HKLM in Vista.
 
 
Post #: 1
 
 RE: Writing to Registry with Vista - 9/25/2008 11:32:16 PM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
I just tested this and it worked for me. Do you have UAC enabled? That could be causing the issue.

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to blazted)
 
 
Post #: 2
 
 RE: Writing to Registry with Vista - 9/26/2008 4:33:35 AM   
  blazted

 

Posts: 18
Score: 0
Joined: 2/6/2006
Status: offline
Yes UAC is enabled. Unfortunately some will have UAC on when this is run. Can you elevate permissions or disable UAC with VB script?

(in reply to mbouchard)
 
 
Post #: 3
 
 RE: Writing to Registry with Vista - 9/26/2008 4:58:57 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
You can disable, but it would require a reboot.

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to blazted)
 
 
Post #: 4
 
 RE: Writing to Registry with Vista - 9/26/2008 8:18:48 AM   
  Fredledingue


Posts: 383
Score: 0
Joined: 5/9/2005
From:
Status: offline
Use "HKEY_CURRENT_USER" insetad of "HKEY_LOCAL_MACHINE".

I had the same problem and I fixedit like this.

If you realy need to work inside HKEY_LOCAL_MACHINE, you will have to disable UAC or login as administrator.

_____________________________

Fred

(in reply to mbouchard)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Writing to Registry with Vista Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts