Solved

permission denied

Posted on 2008-10-09
2
960 Views
Last Modified: 2012-06-21
i am using following to change value of enableLUA , but every time i run code it gives eror of permission denied. pls check why it is happening like this . kindly edit code as required.
Dim oSheluac, valuac
 
Private Function KeyExists (keyName)
	Dim bKey
		
	On Error Resume Next
 
	bKey = oSheluac.RegRead(keyName)
 
	If TypeName (bKey) = "Empty" Then
		KeyExists = False
	Else
		KeyExists = True
	End If
End Function
 
 
Set oSheluac = CreateObject("Wscript.Shell")
 
If keyExists("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA") Then
	wscript.echo "Value exists"
 valuac = osheluac.RegRead ("HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA" )
	if valu <> 0 Then 
	osheluac.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA", 0, "REG_DWORD"
			wscript.echo "The value have been changed."
 
	End If 
Else 
End If

Open in new window

0
Comment
Question by:ankur3020
2 Comments
 
LVL 5

Assisted Solution

by:lodar123
lodar123 earned 50 total points
ID: 22677618
make sure you have access to modify that registry key
0
 

Accepted Solution

by:
ankur3020 earned 0 total points
ID: 22679707
thanks i got the error.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question