2019-11-25-win10-uwp- next load open a command line script

Original: 2019-11-25-win10-uwp- next load open a command line script

title author date CreateTime categories
win10 uwp next load open a command line script
lindexi
2019-11-25 08:57:35 +0800
2019-11-25 08:57:35 +0800
Win10 UWP

Load installed next to the UWP, turn off loading functionality required on the user's device, this function need to click Settings, click to update, find the developer options, click open the next load. This is for the user to install an application requires so many steps point, the user can very seldom succeed. This article tells you how to help users through the command line or open next to the loading function by way of the script

Load is actually written to the registry in the next win10, allowing all applications installed Trust

By calling reg write to the registry, you can use the following command

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowAllTrustedApps" /d "1"

That is, through the command line command administrator rights can modify the registry

If you need to turn on developer mode, you can use the following command

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

If you use a PowerShell script, the code a bit more

$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" 
 
$Name1 = "AllowAllTrustedApps" 
$value1 = "1" 
New-ItemProperty -Path $registryPath -Name $name1 -Value $value1 -PropertyType DWORD -Force 

The above script is turned off loaded, even if the developer mode is turned on, then add the following code to the above code

$Name2 = "AllowDevelopmentWithoutDevLicense" 
$value2 = "0" 
 
New-ItemProperty -Path $registryPath -Name $name2 -Value $value2 -PropertyType DWORD -Force

This can be used next to the load can be installed on a user script or command line by running

Powershell script to Enable Sideloading for Windows 10 v1.0

Guess you like

Origin www.cnblogs.com/lonelyxmas/p/12075878.html