First, I have added create media preset(s) that when used, will send you right at the select usb or save iso dialog.
And when booting from the media, the pick edition dialog will be skipped.
The attempts I've seen in this thread were mostly failing because /Pkey option is only meant for retail bought keys, not for generic / hwid!
To overcome this limitation script simply generates aPID.txt
with the key you provide and then adds it to the mediasources
folder.
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
function Get-Token | |
{ | |
foreach($proc in (Get-Process)) | |
{ | |
if($proc.Id -ne 0 -and $proc.Id -ne 4) | |
{ | |
try | |
{ | |
$hProcess = OpenProcess -ProcessId $proc.Id -DesiredAccess PROCESS_QUERY_LIMITED_INFORMATION | |
} |
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
schtasks /Change /TN "Microsoft\Windows\AppID\SmartScreenSpecific" /Disable | |
schtasks /Change /TN "Microsoft\Windows\ApplicationData\CleanupTemporaryState" /Disable | |
schtasks /Change /TN "Microsoft\Windows\ApplicationData\DsSvcCleanup" /Disable | |
schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable | |
schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable | |
schtasks /Change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /Disable | |
schtasks /Change /TN "Microsoft\Windows\Autochk\Proxy" /Disable | |
schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Disable | |
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable | |
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Disable |