From b20b614f5e18362fb6e14b618e5b589dbb5691a3 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Tue, 6 Aug 2024 17:39:13 -0700 Subject: [PATCH] update changelog.md and ApplyFFU.ps1 to 2408.1 --- ChangeLog.md | 28 +++++++++++++++++++ .../WinPEDeployFFUFiles/ApplyFFU.ps1 | 25 +---------------- README.md | 2 +- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index f90c12d..3cc92fd 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,33 @@ # Change Log +## **2408.1** + +### External Drive Support + +Up until now, the USB build process has supported using drives identified by Windows as removable drives. Most USB sticks will identify as removable, however faster drives may show up as external hard disk media. You may also have a smaller, portable SSD drive that you'd like to use for imaging since these are typically much faster than regular USB 3.x thumb drives. + +In adding this support, I do realize that there is potential for data loss for those that might have external hard drives attached to their machines. + +To handle this, with help from [HedgeComp](https://github.com/HedgeComp), we've refactored the `Get-USBDrives` function. Two new variables have been created: + +| Parameter | Type | Description | +| --------------------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| AllowExternalHardDiskMedia | Bool | If `$true`, will allow the use of media identified as External Hard Disk media via WMI class Win32_DiskDrive. Default is not defined. | +| PromptExternalHardDiskMedia | Bool | If `$true` and AllowExternalHardDiskMedia is `$true`, the script will prompt to select which drive to use. When set to `$true`, only a single drive will be created. If `$false`, the script won't prompt for which external hard disk to use and can use multiple external hard disks, similar to how removable USB drives function. | + +By default, this functionality won't effect previous USB drive creation behavior. However if you want to take advantage of the new functionality, set `-AllowExternalHardDiskMedia $true` + +Fixes/misc + +- Fixed a display issue where if multiple FFU files were in the FFU folder, the script wouldn't display which FFUs to choose from when running the script without -verbose. This will now display a table with the last modified date whether you run with the -verbose switch or not. +- Added start/end/duration time (thanks [HedgeComp](https://github.com/HedgeComp)) +- Fixed an issue where deployment media wasn't prompting for a key to be pressed as expected +- Fixed an issue when creating the USB drive and the drive had a RAW partition style that clear-disk would generate an error +- Cleaned up some commented code +- Added Create-PEMedia.ps1 as a helper script to quickly generate Deploy or Capture media +- Fixed an issue with clean up of Defender/OneDrive/Edge +- Fixed an issue with the formatting of InstallAppsandSysprep.cmd file + ## **2407.1** This is another major release that includes: diff --git a/FFUDevelopment/WinPEDeployFFUFiles/ApplyFFU.ps1 b/FFUDevelopment/WinPEDeployFFUFiles/ApplyFFU.ps1 index 0b38ee5..7240239 100644 --- a/FFUDevelopment/WinPEDeployFFUFiles/ApplyFFU.ps1 +++ b/FFUDevelopment/WinPEDeployFFUFiles/ApplyFFU.ps1 @@ -14,10 +14,6 @@ function Get-USBDrive(){ return $USBDriveLetter } -# function Get-HardDrive(){ -# $DeviceID = (Get-WmiObject -Class 'Win32_DiskDrive' | Where-Object {$_.MediaType -eq 'Fixed hard disk media' -and $_.Model -ne 'Microsoft Virtual Disk'}).DeviceID -# return $DeviceID -# } function Get-HardDrive(){ $SystemInfo = Get-WmiObject -Class 'Win32_ComputerSystem' $Manufacturer = $SystemInfo.Manufacturer @@ -127,27 +123,12 @@ function Invoke-Process { } -# This function can be used in instances where battery level might matter (e.g. installing firmware for Surface). The problem is that WinPE doesn't have -# a driver for the battery installed, so you'll need to inject drivers, which can be tricky because just injecting the battery driver might not be enough, -# you might also need other drivers that the battery driver is dependent on. -# function Get-Battery(){ -# while (($BattLev = (Get-CimInstance win32_battery).EstimatedChargeRemaining) -lt "35") -# { -# WriteLog "Battery is currently at $BattLev`%. Waiting for 35`% to proceed..." -# Write-Host "Battery is currently at $BattLev`%. Waiting for 35`% to proceed..." -# Start-Sleep 60 -# } - -# WriteLog "Battery level is $BattLev `%, which is greater than 35'% applying FFU" -# Write-Host "Battery level is $BattLev `%, which is greater than 35'% applying FFU" -# } - #Get USB Drive and create log file $LogFileName = 'ScriptLog.txt' $USBDrive = Get-USBDrive New-item -Path $USBDrive -Name $LogFileName -ItemType "file" -Force | Out-Null $LogFile = $USBDrive + $LogFilename -$version = '2407.1' +$version = '2408.1' WriteLog 'Begin Logging' WriteLog "Script version: $version" @@ -432,10 +413,6 @@ If (Test-Path -Path $Drivers) Writelog 'No driver folders found' } } - -#If you want to enable battery level checking, uncomment the line below as well as the Get-Battery function near the top of the script -#Get-Battery - #Partition drive Writelog 'Clean Disk' try { diff --git a/README.md b/README.md index 69b5df0..935b959 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ The Full-Flash update (FFU) process can automatically download the latest releas ## YouTube Detailed Walkthrough -The first 15 minutes of the following video includes a quick start demo to get started. Below the video are a list of chapters +The first 15 minutes of the following video includes a quick start demo to get started. Below the video are a list of chapters. This video was taken with the 2407.2 build. Features released after that will not be demonstrated in the video. [![Reimage Windows Fast with Full-Flash Update (FFU))](https://img.youtube.com/vi/rqXRbgeeKSQ/maxresdefault.jpg)](https://www.youtube.com/watch?v=rqXRbgeeKSQ "Reimage Windows Fast with Full-Flash Update (FFU))")