Hi
I try to disable UAC in Windows 7 via Command Prompt but I got ERROR: Access is denied.
Anyone know how I solved it?maybe my commands is wrong!!!

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
ERROR: Access is denied.

Dani AI

Generated

Quick expert note: the "ERROR: Access is denied." seen by normally means the shell doing the registry write was not elevated. was correct — edits to machine-wide registry hives need an elevated (Administrator) session. How to open an elevated command prompt (TechTarget). (techtarget.com)

Open an elevated console (right‑click Command Prompt → Run as administrator, or press Ctrl+Shift+Enter after typing cmd). From PowerShell an easy way is:

Start-Process cmd -Verb RunAs

Confirm the window title starts with "Administrator:" before running registry commands. (techtarget.com)

On 64‑bit Windows there is an extra pitfall: a 32‑bit host/process will be redirected to the 32‑bit registry view (WOW6432Node). To make sure the change lands in the 64‑bit hive either call the 64‑bit reg.exe via the Sysnative alias or use reg.exe’s /reg:64 switch. Example (runs the 64‑bit reg tool from a 32‑bit process):

%windir%\Sysnative\reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f

Or use reg add ... /reg:64. See Microsoft’s file‑system redirector notes and reg tool docs. (learn.microsoft.com)

A full reboot is required for the UAC master switch change to take effect; disabling UAC reduces system protections and is discouraged except in constrained scenarios (use the Control Panel slider or Local Security Policy to adjust prompts instead). Back up the key first:

reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "%userprofile%\desktop\UAC-backup.reg"

If edits still fail after using an elevated 64‑bit context, group policy or explicit registry permissions/ownership may be blocking writes — check policy settings or the key’s ACL before forcing ownership. For guidance on restart/impact and safer alternatives see Microsoft and HowToGeek resources. (howtogeek.com)

Recommended Answers

All 2 Replies

Try running it in a command prompt as Administrator.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.