Registry Mirror
搜索
Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Files
Expand file tree
main
Breadcrumbs
sudo
/
enable_sudo.cmd
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
19 lines (14 loc) · 310 Bytes
main
Breadcrumbs
sudo
/
enable_sudo.cmd
Copy path
Top
File metadata and controls
Code
Blame
19 lines (14 loc) · 310 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@echo off
net session >nul 2>&1
if %errorLevel% == 0 (
goto :do_it
)
echo You need to be admin to enable sudo!
goto :exit
:do_it
echo Enabling sudo...
set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Sudo
set value=Enabled
set data=3
reg add "%key%" /v "%value%" /t REG_DWORD /d %data% /f
:exit
You can’t perform that action at this time.