cramaboule Posted February 27, 2023 Posted February 27, 2023 (edited) Automatique upgrade to Windows 11 Put in the same Directory your *.ISO file and the Skip_TPM_Check_on_Dynamic_Update.cmd from MediaCreationTool.bat. ISO can be made from uupdump.net Compile with AutoIt and run. W11 22h2 will be deployed. Have fun. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Description=Auto Upgrade W11 #AutoIt3Wrapper_Res_ProductName=Auto Upgrade W11 #AutoIt3Wrapper_Run_Tidy=y #Tidy_Parameters=/reel #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/mo #AutoIt3Wrapper_Res_ProductVersion=1.0.1.1 #AutoIt3Wrapper_Res_Fileversion=1.0.1.1 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.16.0 Author: Cramaboule Date: December 2022 Script Function: Auto Upgrade to W11 Source: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options?view=windows-11 Bug: Not known To do: V1.0.1.1 14.02.2022: Fixed: Mounting ISO with spaces in path in now fixed. Changed: Alwayas unzipp and always install TPM with the 'install' argument. Fixed: Small bugs V1.0.1.0 17.01.2023: Changed: Get drive letter by loop! V1.0.0.1 29.12.2022: Changed: Get drive letter from powershell Changed: Check if zip is already expended Changed: Check if iso file is mounted Changed: Display message V1.0.0.0 28.12.2022: Inital relase #ce ---------------------------------------------------------------------------- #RequireAdmin #include <Array.au3> #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> $sIsoFile = @ScriptDir & '\22621.963.221202-2359.NI_RELEASE_SVC_PROD1_CLIENTPRO_OEMRET_X64FRE_FR-FR.ISO' Global $Title = 'Auto Upgrade W11' Global $font = 'Segoe UI Light', $sFinalMessage SplashTextOn($Title, '', 300, 400, -1, -1, $DLG_TEXTLEFT, $font, 14, 400) _Splash('Checking free space') $iFreeSpace = DriveSpaceFree(@HomeDrive & "\") ; usualy C:\ If Round(Number($iFreeSpace) / 1024, 2) < 15 Then If (MsgBox($MB_ICONERROR + $MB_YESNO, 'No free space', 'You must have at least 15 Go free on your hard disk.' & @CRLF & 'You have: ' & Round(Number($iFreeSpace) / 1024, 2) & ' Go' & @CRLF & @CRLF & 'Would you like to continue ?') = $IDNO) Then Exit EndIf _Splash('Done') _Splash('Unzipping zip file') RunWait(@ComSpec & ' /c ' & 'powershell -command "Expand-Archive -Path W11bypassTPM.zip -Force"') _Splash('Done') _Splash('Skipping TPM') RunWait(@ComSpec & ' /c ' & 'W11bypassTPM\MediaCreationTool.bat-main\bypass11\Skip_TPM_Check_on_Dynamic_Update.cmd install') _Splash('Done') _Splash('Mounting ISO') If Not (_GetDriveLetter()) Then RunWait(@ComSpec & ' /c ' & 'powershell -command "Mount-DiskImage -ImagePath \"' & $sIsoFile & '\""') EndIf $sDrive = _GetDriveLetter() _Splash('Done') If $sDrive Then _Splash('Running setup.exe') Run(@ComSpec & ' /c ' & 'start ' & $sDrive & ':\setup.exe /auto upgrade /dynamicupdate disable /eula accept') Sleep(10000) ; 10 secondes Exit Else _Splash('Error: No Setup found') MsgBox($MB_TOPMOST + $MB_ICONERROR, 'Error', 'No "Setup.exe" found' & @CRLF & 'Error: ' & $sDrive) Exit EndIf Func _GetDriveLetter() Local $sOutput = '' For $i = 1 To 26 ; A = 65 $Letter = Chr($i + 64) If FileExists($Letter & ':\sources\install.wim') Then Return $Letter EndIf Next Return False EndFunc ;==>_GetDriveLetter Func _Splash($message) $sFinalMessage = $sFinalMessage & $message & @CRLF ControlSetText($Title, "", "Static1", $sFinalMessage) EndFunc ;==>_Splash Edited February 27, 2023 by cramaboule Remove sensitiv data My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website
Earthshine Posted February 28, 2023 Posted February 28, 2023 (edited) You can’t skip tpm anymore. Are you using a hacked iso? You must be. I don’t see you sourcing it from Microsoft. Edited February 28, 2023 by Earthshine My resources are limited. You must ask the right questions
Developers Jos Posted February 28, 2023 Developers Posted February 28, 2023 Ok.. @cramaboule, are any of the components against MS rules? Everybody: please stay out for the moment. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
cramaboule Posted March 1, 2023 Author Posted March 1, 2023 @jos Hummmmm. Honestlely I do not know. * UUP dump - Download UUP files from Windows Update servers with ease. * that's what they say on their website. If 'skip TPM' is against MS rules then feel free to remove the post. I havn't think about that! C. My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website
Developers Jos Posted March 2, 2023 Developers Posted March 2, 2023 As long as official software is used from Microsoft , I see no issues.... so is it? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
PixelPixPanreyes Posted May 21 Posted May 21 Hi! Just wanted to share something I just found: Upgrade to W11 fails if the EXE was executed from a browser Check it yourself: - Windows 10 PC - Decompress Windows 11 ISO in C:\w11iso - Get AutoIT and compile test_upgrade11.au3 to an EXE - Upload it somewhere - Download and execute from a browser: It will fail to start the upgrade with the error 0x8007007F (in C:$Windows.~BT\Sources\Panther\setuperr.log) - Execute it again from Windows Explorer: It will go fine. #RequireAdmin Global $iso_path = "c:\w11iso" If(Not FileExists($iso_path & "\setup.exe")) Then MsgBox(16, "Error", "Please decompress a W11 ISO in C:\w11iso") Exit EndIF If(MsgBox(4,0,"Auto upgrade from W10 to W11. Continue?") <> 6) Then Exit EndIf Run($iso_path & "\setup.exe /auto upgrade /eula accept /DynamicUpdate disable", $iso_path) Sleep(5000) If(Not ProcessExists("SetupPrep.exe")) Then MsgBox(16, "Error", "Process failed! Try again by running " & @ScriptName & " from Windows Explorer instead of from the browser.") EndIf https://github.com/panreyes/upgrate_to_w11_fails_from_browser Does anyone know the reason behind this mystery?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now