/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


UAC Set Registry as DWORD

05/01/2012 5579 views

Hello,

I am by no means a pro when it comes to scripting. As I understand it, I should be able to verify and set registry keys through the KBOX scriptiong module, I am having some troubles setting them correctly. I am trying to turn on and off Windows 7 UAC. Every time I try to run the script, instead of setting the value to a DWORD, it sets the value as a string. Has anyone else seen this issue?

 Here is my KScript.

Verify a registry value exists...
Key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Name: EnableLUA

Verify a registry value is exactly...
Key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Name: EnableLUA
Equal to: 1

On Success
Set a registry value...
Key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Name: EnableLUA
Type: REG_DWORD
Data: 0

Thanks for your help,
Brad

Answer Summary:
I would have it run this command on success: reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
0 Comments   [ + ] Show comments

Comments



Community Chosen Answer

1

I would have it run this command on success:

reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
Answered 05/02/2012 by: mpace
Red Belt

  • Or why not just run that on all machines regardless? If its not set, it will be. If it is no harm no foul.

All Answers

0

I'm not a KBox user, but do you really need REG_DWORD? Isn't it sufficient with only DWORD?

Answered 05/02/2012 by: andemats
2nd Degree Black Belt

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ