Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Win10: How to activate developer mode using powershell or cmd.exe?

I want to activate the developer mode (to use the ubuntu subsystem), but I don't have admin account credentials. However, I have access to a cmd.exe with admin rights. So I can open regedit and use the powershell without restrictions. Some tutorials (this one for example) state that the dev mode can be easily activated by creating or setting special keys in the registry:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock\AllowDevelopmentWithoutDevLicense

In my case these keys did not exist in the registry before, so I added them manually. Sadly, it does not work and dev mode is still inactive. I also tried to open the Settings App using the terminal (start ms-settings:) and enable dev mode using the GUI, but it seems like the start command ignores/flushes the admin previleges and the app asks for credentials.

OS: Win10
Build Version: 14393.1198

EDIT

Because of @magicandre1981 answer, I tried to run the following command

DISM /Online /Add-Capability /CapabilityName:Tools.DeveloperMode.Core~~~~0.0.1.0

But I got this error:

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Error: 11

You cannot service a running 64-bit operating system with a 32-bit version of DISM.
Please use the version of DISM that corresponds to your computer's architecture.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

With the help of google, I found out that I have to use a different cmd.exe version located in C:\\Windows\native. So I navigated there and called cmd.exe. After that I got another error, that the current directory is invalid, but after navigating back to C:\\Windows\System32 the command finished without an error. However, it still does not work. I restarted the system and the dev mode is still not activated.

like image 392
NaN Avatar asked May 24 '17 12:05

NaN


People also ask

How do I enable developer mode in CMD?

Open a command prompt by typing CMD in the search bar and opening it as an administrator. Type gpupdate into the command window and click OK. It will enable Developer Mode on your PC immediately.

Can I enable developer mode in Windows 10?

Enabling Developer Mode (including installing and operating apps other than the apps downloaded from Microsoft Store) may result in security risks to the device and personal data or damage the device. Exercise caution when enabling this mode.

How do I enable developer mode in my system?

Activate Developer Mode To enable Developer Mode, or access other settings: From the For developers settings dialog, choose the level of access that you need. Read the disclaimer for the setting you choose. Click Yes to accept the change.


1 Answers

In the cmd.exe that is running as admin, run the following 2 commands:

REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

and

DISM /Online /Add-Capability /CapabilityName:Tools.DeveloperMode.Core~~~~0.0.1.0

Depending on Which Windows 10 Build you run, you may need to reboot the system to finish setup.

To enable the Linux Subsystem, open a cmd.exe as admin and run

DISM /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux
like image 191
magicandre1981 Avatar answered Sep 24 '22 00:09

magicandre1981