/build/static/layout/Breadcrumb_cap_w.png

UAC Set Registry as DWORD

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


0 Comments   [ + ] Show comments

Answers (2)

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
Posted by: mpace 11 years ago
Red Belt
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

Comments:
  • Or why not just run that on all machines regardless? If its not set, it will be. If it is no harm no foul. - dchristian 11 years ago
Posted by: andemats 11 years ago
2nd Degree Black Belt
0

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

 
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