Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use code to add administrator privileges to a computer

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "how to use code to add administrator rights in computers", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article, let's take a look at this article "how computers use code to add administrator rights" article.

1. In the blank space on the desktop, right-click and select New text document in the menu item that opens.

2. Copy the following code to the new text document

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ *\ shell\ runas]

@ = "Administrator takes ownership"

"NoWorkingDirectory" = ""

[HKEY_CLASSES_ROOT\ *\ shell\ runas\ command]

@ = "cmd.exe / c takeown / f\" 1\ "& & icacls\" 1\ "/ grant administrators:F"

"IsolatedCommand" = "cmd.exe / c takeown / f\" 1\ "& & icacls\" 1\ "/ grant administrators:F"

[HKEY_CLASSES_ROOT\ exefile\ shell\ runas2]

@ = "Administrator takes ownership"

"NoWorkingDirectory" = ""

[HKEY_CLASSES_ROOT\ exefile\ shell\ runas2\ command]

@ = "cmd.exe / c takeown / f\" 1\ "& & icacls\" 1\ "/ grant administrators:F"

"IsolatedCommand" = "cmd.exe / c takeown / f\" 1\ "& & icacls\" 1\ "/ grant administrators:F"

[HKEY_CLASSES_ROOT\ Directory\ shell\ runas]

@ = "Administrator takes ownership"

"NoWorkingDirectory" = ""

[HKEY_CLASSES_ROOT\ Directory\ shell\ runas\ command]

@ = "cmd.exe / c takeown / f\"% 1\ "/ r / d y & & icacls\"% 1\ "/ grant administrators:F / t"

"IsolatedCommand" = "cmd.exe / c takeown / f\"% 1\ "/ r / d y & & icacls\"% 1\ "/ grant administrators:F / t"

Click Save, then change the text document suffix to .reg, and then double-click to run.

The above is about the content of this article on "how to add administrator rights with computer code". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report