From 24a7d13e1b1af95467c38113d42a51557a9adf1e Mon Sep 17 00:00:00 2001 From: MyDrift Date: Fri, 25 Oct 2024 10:56:50 +0200 Subject: [PATCH] change to easier naming scheme - rename files - rename function names --- config/autounattend.xml | 6 +- functions/microwin/Invoke-Microwin.ps1 | 62 +++++++++---------- functions/microwin/Invoke-MicrowinGetIso.ps1 | 4 +- ...crowinClasses.ps1 => Microwin-Classes.ps1} | 0 ...inCopyToUSB.ps1 => Microwin-CopyToUSB.ps1} | 2 +- ...re.ps1 => Microwin-GetLangFromCulture.ps1} | 2 +- ...ers.ps1 => Microwin-GetLocalizedUsers.ps1} | 4 +- ...GetOscdimg.ps1 => Microwin-GetOscdimg.ps1} | 4 +- ...stall.ps1 => Microwin-NewCheckInstall.ps1} | 2 +- ...wFirstRun.ps1 => Microwin-NewFirstRun.ps1} | 2 +- ...wUnattend.ps1 => Microwin-NewUnattend.ps1} | 6 +- ...atures.ps1 => Microwin-RemoveFeatures.ps1} | 4 +- ...ps1 => Microwin-RemoveFileOrDirectory.ps1} | 2 +- ...ckages.ps1 => Microwin-RemovePackages.ps1} | 2 +- ...=> Microwin-RemoveProvisionedPackages.ps1} | 4 +- ...e.ps1 => Microwin-TestCompatibleImage.ps1} | 2 +- scripts/main.ps1 | 2 +- 17 files changed, 55 insertions(+), 55 deletions(-) rename functions/microwin/{Invoke-MicrowinClasses.ps1 => Microwin-Classes.ps1} (100%) rename functions/microwin/{Invoke-MicrowinCopyToUSB.ps1 => Microwin-CopyToUSB.ps1} (94%) rename functions/microwin/{Invoke-MicrowinGetLangFromCulture.ps1 => Microwin-GetLangFromCulture.ps1} (97%) rename functions/microwin/{Invoke-MicrowinGet-LocalizedUsers.ps1 => Microwin-GetLocalizedUsers.ps1} (86%) rename functions/microwin/{Invoke-MicrowinGetOscdimg.ps1 => Microwin-GetOscdimg.ps1} (92%) rename functions/microwin/{Invoke-MicrowinNewCheckInstall.ps1 => Microwin-NewCheckInstall.ps1} (98%) rename functions/microwin/{Invoke-MicrowinNewFirstRun.ps1 => Microwin-NewFirstRun.ps1} (99%) rename functions/microwin/{Invoke-MicrowinNewUnattend.ps1 => Microwin-NewUnattend.ps1} (98%) rename functions/microwin/{Invoke-MicrowinRemoveFeatures.ps1 => Microwin-RemoveFeatures.ps1} (95%) rename functions/microwin/{Invoke-MicrowinRemoveFileOrDirectory.ps1 => Microwin-RemoveFileOrDirectory.ps1} (94%) rename functions/microwin/{Invoke-MicrowinRemovePackages.ps1 => Microwin-RemovePackages.ps1} (99%) rename functions/microwin/{Invoke-MicrowinRemoveProvisionedPackages.ps1 => Microwin-RemoveProvisionedPackages.ps1} (95%) rename functions/microwin/{Invoke-MicrowinTestCompatibleImage.ps1 => Microwin-TestCompatibleImage.ps1} (92%) diff --git a/config/autounattend.xml b/config/autounattend.xml index 6cfe33a4..a1daf403 100644 --- a/config/autounattend.xml +++ b/config/autounattend.xml @@ -113,7 +113,7 @@ 19 - powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\Invoke-MicrowinRemovePackages.ps1' -Raw | Invoke-Expression;" + powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\Microwin-RemovePackages.ps1' -Raw | Invoke-Expression;" 20 @@ -312,7 +312,7 @@ foreach( $file in $Document.unattend.Extensions.File ) { [System.IO.File]::WriteAllBytes( $path, ( $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ) ) ); } - + $selectors = @( 'Microsoft.Microsoft3DViewer'; 'Microsoft.BingSearch'; @@ -359,7 +359,7 @@ $removeCommand = { } }; $type = 'Package'; -$logfile = 'C:\Windows\Temp\Invoke-MicrowinRemovePackages.log'; +$logfile = 'C:\Windows\Temp\Microwin-RemovePackages.log'; & { $installed = & $getCommand; foreach( $selector in $selectors ) { diff --git a/functions/microwin/Invoke-Microwin.ps1 b/functions/microwin/Invoke-Microwin.ps1 index acaa2654..567e0aa4 100644 --- a/functions/microwin/Invoke-Microwin.ps1 +++ b/functions/microwin/Invoke-Microwin.ps1 @@ -78,7 +78,7 @@ public class PowerManagement { $imgVersion = (Get-WindowsImage -ImagePath $mountDir\sources\install.wim -Index $index).Version # Detect image version to avoid performing MicroWin processing on Windows 8 and earlier - if ((Invoke-MicrowinTestCompatibleImage $imgVersion $([System.Version]::new(10,0,10240,0))) -eq $false) { + if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,10240,0))) -eq $false) { $msg = "This image is not compatible with MicroWin processing. Make sure it isn't a Windows 8 or earlier image." $dlg_msg = $msg + "`n`nIf you want more information, the version of the image selected is $($imgVersion)`n`nIf an image has been incorrectly marked as incompatible, report an issue to the developers." Write-Host $msg @@ -88,7 +88,7 @@ public class PowerManagement { } # Detect whether the image to process contains Windows 10 and show warning - if ((Invoke-MicrowinTestCompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) { + if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) { $msg = "Windows 10 has been detected in the image you want to process. While you can continue, Windows 10 is not a recommended target for MicroWin, and you may not get the full experience." $dlg_msg = $msg Write-Host $msg @@ -155,12 +155,12 @@ public class PowerManagement { } Write-Host "Remove Features from the image" - Invoke-MicrowinRemoveFeatures + Microwin-RemoveFeatures Write-Host "Removing features complete!" Write-Host "Removing OS packages" - Invoke-MicrowinRemovePackages + Microwin-RemovePackages Write-Host "Removing Appx Bloat" - Invoke-MicrowinRemoveProvisionedPackages + Microwin-RemoveProvisionedPackages # Detect Windows 11 24H2 and add dependency to FileExp to prevent Explorer look from going back - thanks @WitherOrNot and @thecatontheceiling if ((Test-CompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) { @@ -170,7 +170,7 @@ public class PowerManagement { # 1. Take ownership of the file, from TrustedInstaller to Administrators takeown /F "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /A # 2. Set ACLs so that we can write to it - icacls "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /grant "$(Invoke-MicrowinGetLocalizedUsers -admins $true):(M)" | Out-Host + icacls "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /grant "$(Microwin-GetLocalizedUsers -admins $true):(M)" | Out-Host # 3. Open the file and do the modification $appxManifest = Get-Content -Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" $originalLine = $appxManifest[13] @@ -184,40 +184,40 @@ public class PowerManagement { } } - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LocationNotificationWindows.exe" - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Photo Viewer" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Photo Viewer" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Media Player" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Media Player" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Mail" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Mail" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Internet Explorer" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Internet Explorer" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\GameBarPresenceWriter" - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDriveSetup.exe" - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDrive.ico" - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*narratorquickstart*" -Directory - Invoke-MicrowinRemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*ParentalControls*" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LocationNotificationWindows.exe" + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Photo Viewer" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Photo Viewer" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Media Player" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Media Player" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Mail" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Mail" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Internet Explorer" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Internet Explorer" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\GameBarPresenceWriter" + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDriveSetup.exe" + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDrive.ico" + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*narratorquickstart*" -Directory + Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*ParentalControls*" -Directory Write-Host "Removal complete!" Write-Host "Create unattend.xml" - #Invoke-MicrowinNewUnattend + #Microwin-NewUnattend if ($sync.MicrowinUserName.Text -eq "") { - Invoke-MicrowinNewUnattend -userName "User" + Microwin-NewUnattend -userName "User" } else { if ($sync.MicrowinUserPassword.Password -eq "") { - Invoke-MicrowinNewUnattend -userName "$($sync.MicrowinUserName.Text)" + Microwin-NewUnattend -userName "$($sync.MicrowinUserName.Text)" } else { - Invoke-MicrowinNewUnattend -userName "$($sync.MicrowinUserName.Text)" -userPassword "$($sync.MicrowinUserPassword.Password)" + Microwin-NewUnattend -userName "$($sync.MicrowinUserName.Text)" -userPassword "$($sync.MicrowinUserPassword.Password)" } } Write-Host "Done Create unattend.xml" @@ -230,7 +230,7 @@ public class PowerManagement { Write-Host "Done Copy unattend.xml" Write-Host "Create FirstRun" - Invoke-MicrowinNewFirstRun + Microwin-NewFirstRun Write-Host "Done create FirstRun" Write-Host "Copy FirstRun.ps1 into the ISO" Copy-Item "$env:temp\FirstStartup.ps1" "$($scratchDir)\Windows\FirstStartup.ps1" -force @@ -242,7 +242,7 @@ public class PowerManagement { dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default" Write-Host "Copy checkinstall.cmd into the ISO" - Invoke-MicrowinNewCheckInstall + Microwin-NewCheckInstall Copy-Item "$env:temp\checkinstall.cmd" "$($scratchDir)\Windows\checkinstall.cmd" -force Write-Host "Done copy checkinstall.cmd" @@ -318,7 +318,7 @@ public class PowerManagement { reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "AppsUseLightTheme" /t REG_DWORD /d 0 /f reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "SystemUsesLightTheme" /t REG_DWORD /d 0 /f - if ((Invoke-MicrowinTestCompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) { + if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) { # We're dealing with Windows 10. Configure sane desktop settings. NOTE: even though stuff to disable News and Interests is there, # it doesn't seem to work, and I don't want to waste more time dealing with an operating system that will lose support in a year (2025) @@ -430,7 +430,7 @@ public class PowerManagement { if ($copyToUSB) { Write-Host "Copying target ISO to the USB drive" - Invoke-MicrowinCopyToUSB("$($SaveDialog.FileName)") + Microwin-CopyToUSB("$($SaveDialog.FileName)") if ($?) { Write-Host "Done Copying target ISO to USB drive!" } else { Write-Host "ISO copy failed." } } diff --git a/functions/microwin/Invoke-MicrowinGetIso.ps1 b/functions/microwin/Invoke-MicrowinGetIso.ps1 index 9e438662..43f4caed 100644 --- a/functions/microwin/Invoke-MicrowinGetIso.ps1 +++ b/functions/microwin/Invoke-MicrowinGetIso.ps1 @@ -50,7 +50,7 @@ function Invoke-MicrowinGetIso { return } else { [System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it from github. This might take a long time.") - Invoke-MicrowinGetOscdimg -oscdimgPath $oscdimgPath + Microwin-GetOscdimg -oscdimgPath $oscdimgPath $oscdImgFound = Test-Path $oscdimgPath -PathType Leaf if (!$oscdImgFound) { $msg = "oscdimg was not downloaded can not proceed" @@ -100,7 +100,7 @@ function Invoke-MicrowinGetIso { Set-Location -Path $env:temp # Detect if the first option ("System language") has been selected and get a Fido-approved language from the current culture $lang = if ($sync["ISOLanguage"].SelectedIndex -eq 0) { - Invoke-MicrowinGetLangFromCulture -langName (Get-Culture).Name + Microwin-GetLangFromCulture -langName (Get-Culture).Name } else { $sync["ISOLanguage"].SelectedItem } diff --git a/functions/microwin/Invoke-MicrowinClasses.ps1 b/functions/microwin/Microwin-Classes.ps1 similarity index 100% rename from functions/microwin/Invoke-MicrowinClasses.ps1 rename to functions/microwin/Microwin-Classes.ps1 diff --git a/functions/microwin/Invoke-MicrowinCopyToUSB.ps1 b/functions/microwin/Microwin-CopyToUSB.ps1 similarity index 94% rename from functions/microwin/Invoke-MicrowinCopyToUSB.ps1 rename to functions/microwin/Microwin-CopyToUSB.ps1 index c6389234..06f4219d 100644 --- a/functions/microwin/Invoke-MicrowinCopyToUSB.ps1 +++ b/functions/microwin/Microwin-CopyToUSB.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinCopyToUSB([string]$fileToCopy) { +function Microwin-CopyToUSB([string]$fileToCopy) { foreach ($volume in Get-Volume) { if ($volume -and $volume.FileSystemLabel -ieq "ventoy") { $destinationPath = "$($volume.DriveLetter):\" diff --git a/functions/microwin/Invoke-MicrowinGetLangFromCulture.ps1 b/functions/microwin/Microwin-GetLangFromCulture.ps1 similarity index 97% rename from functions/microwin/Invoke-MicrowinGetLangFromCulture.ps1 rename to functions/microwin/Microwin-GetLangFromCulture.ps1 index 4a4234dc..5c6d8fd0 100644 --- a/functions/microwin/Invoke-MicrowinGetLangFromCulture.ps1 +++ b/functions/microwin/Microwin-GetLangFromCulture.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinGetLangFromCulture { +function Microwin-GetLangFromCulture { param ( [Parameter(Mandatory, Position = 0)] [string]$langName diff --git a/functions/microwin/Invoke-MicrowinGet-LocalizedUsers.ps1 b/functions/microwin/Microwin-GetLocalizedUsers.ps1 similarity index 86% rename from functions/microwin/Invoke-MicrowinGet-LocalizedUsers.ps1 rename to functions/microwin/Microwin-GetLocalizedUsers.ps1 index 0fd98e4a..0f7bf7bd 100644 --- a/functions/microwin/Invoke-MicrowinGet-LocalizedUsers.ps1 +++ b/functions/microwin/Microwin-GetLocalizedUsers.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinGetLocalizedUsers +function Microwin-GetLocalizedUsers { <# .SYNOPSIS @@ -8,7 +8,7 @@ function Invoke-MicrowinGetLocalizedUsers .OUTPUTS A string containing the localized user group .EXAMPLE - Invoke-MicrowinGetLocalizedUsers -admins $true + Microwin-GetLocalizedUsers -admins $true #> param ( [Parameter(Mandatory = $true, Position = 0)] [bool]$admins diff --git a/functions/microwin/Invoke-MicrowinGetOscdimg.ps1 b/functions/microwin/Microwin-GetOscdimg.ps1 similarity index 92% rename from functions/microwin/Invoke-MicrowinGetOscdimg.ps1 rename to functions/microwin/Microwin-GetOscdimg.ps1 index a515310c..f395f71f 100644 --- a/functions/microwin/Invoke-MicrowinGetOscdimg.ps1 +++ b/functions/microwin/Microwin-GetOscdimg.ps1 @@ -1,10 +1,10 @@ -function Invoke-MicrowinGetOscdimg { +function Microwin-GetOscdimg { <# .DESCRIPTION This function will download oscdimg file from github Release folders and put it into env:temp folder .EXAMPLE - Invoke-MicrowinGetOscdimg + Microwin-GetOscdimg #> param( diff --git a/functions/microwin/Invoke-MicrowinNewCheckInstall.ps1 b/functions/microwin/Microwin-NewCheckInstall.ps1 similarity index 98% rename from functions/microwin/Invoke-MicrowinNewCheckInstall.ps1 rename to functions/microwin/Microwin-NewCheckInstall.ps1 index f1b2979b..6520ac6a 100644 --- a/functions/microwin/Invoke-MicrowinNewCheckInstall.ps1 +++ b/functions/microwin/Microwin-NewCheckInstall.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinNewCheckInstall { +function Microwin-NewCheckInstall { # using here string to embedd firstrun $checkInstall = @' diff --git a/functions/microwin/Invoke-MicrowinNewFirstRun.ps1 b/functions/microwin/Microwin-NewFirstRun.ps1 similarity index 99% rename from functions/microwin/Invoke-MicrowinNewFirstRun.ps1 rename to functions/microwin/Microwin-NewFirstRun.ps1 index db056941..bb2deb6d 100644 --- a/functions/microwin/Invoke-MicrowinNewFirstRun.ps1 +++ b/functions/microwin/Microwin-NewFirstRun.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinNewFirstRun { +function Microwin-NewFirstRun { # using here string to embedd firstrun $firstRun = @' diff --git a/functions/microwin/Invoke-MicrowinNewUnattend.ps1 b/functions/microwin/Microwin-NewUnattend.ps1 similarity index 98% rename from functions/microwin/Invoke-MicrowinNewUnattend.ps1 rename to functions/microwin/Microwin-NewUnattend.ps1 index bd35b0a6..87188aca 100644 --- a/functions/microwin/Invoke-MicrowinNewUnattend.ps1 +++ b/functions/microwin/Microwin-NewUnattend.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinNewUnattend { +function Microwin-NewUnattend { param ( [Parameter(Mandatory, Position = 0)] [string]$userName, @@ -160,7 +160,7 @@ function Invoke-MicrowinNewUnattend { 19 - powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\Invoke-MicrowinRemovePackages.ps1' -Raw | Invoke-Expression;" + powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\Microwin-RemovePackages.ps1' -Raw | Invoke-Expression;" 20 @@ -294,7 +294,7 @@ function Invoke-MicrowinNewUnattend { '@ - if ((Invoke-MicrowinTestCompatibleImage $imgVersion $([System.Version]::new(10,0,22000,1))) -eq $false) { + if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,22000,1))) -eq $false) { # Replace the placeholder text with an empty string to make it valid for Windows 10 Setup $unattend = $unattend.Replace("<#REPLACEME#>", "").Trim() } else { diff --git a/functions/microwin/Invoke-MicrowinRemoveFeatures.ps1 b/functions/microwin/Microwin-RemoveFeatures.ps1 similarity index 95% rename from functions/microwin/Invoke-MicrowinRemoveFeatures.ps1 rename to functions/microwin/Microwin-RemoveFeatures.ps1 index 8c32dbf9..5b37adb2 100644 --- a/functions/microwin/Invoke-MicrowinRemoveFeatures.ps1 +++ b/functions/microwin/Microwin-RemoveFeatures.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinRemoveFeatures() { +function Microwin-RemoveFeatures() { <# .SYNOPSIS Removes certain features from ISO image @@ -7,7 +7,7 @@ function Invoke-MicrowinRemoveFeatures() { No Params .EXAMPLE - Invoke-MicrowinRemoveFeatures + Microwin-RemoveFeatures #> try { $featlist = (Get-WindowsOptionalFeature -Path $scratchDir) diff --git a/functions/microwin/Invoke-MicrowinRemoveFileOrDirectory.ps1 b/functions/microwin/Microwin-RemoveFileOrDirectory.ps1 similarity index 94% rename from functions/microwin/Invoke-MicrowinRemoveFileOrDirectory.ps1 rename to functions/microwin/Microwin-RemoveFileOrDirectory.ps1 index fb08a1db..002e7a65 100644 --- a/functions/microwin/Invoke-MicrowinRemoveFileOrDirectory.ps1 +++ b/functions/microwin/Microwin-RemoveFileOrDirectory.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinRemoveFileOrDirectory([string]$pathToDelete, [string]$mask = "", [switch]$Directory = $false) { +function Microwin-RemoveFileOrDirectory([string]$pathToDelete, [string]$mask = "", [switch]$Directory = $false) { if(([string]::IsNullOrEmpty($pathToDelete))) { return } if (-not (Test-Path -Path "$($pathToDelete)")) { return } diff --git a/functions/microwin/Invoke-MicrowinRemovePackages.ps1 b/functions/microwin/Microwin-RemovePackages.ps1 similarity index 99% rename from functions/microwin/Invoke-MicrowinRemovePackages.ps1 rename to functions/microwin/Microwin-RemovePackages.ps1 index f94fc9d6..ed53056c 100644 --- a/functions/microwin/Invoke-MicrowinRemovePackages.ps1 +++ b/functions/microwin/Microwin-RemovePackages.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinRemovePackages { +function Microwin-RemovePackages { try { $pkglist = (Get-WindowsPackage -Path "$scratchDir").PackageName diff --git a/functions/microwin/Invoke-MicrowinRemoveProvisionedPackages.ps1 b/functions/microwin/Microwin-RemoveProvisionedPackages.ps1 similarity index 95% rename from functions/microwin/Invoke-MicrowinRemoveProvisionedPackages.ps1 rename to functions/microwin/Microwin-RemoveProvisionedPackages.ps1 index 33bd0d94..30bc0d74 100644 --- a/functions/microwin/Invoke-MicrowinRemoveProvisionedPackages.ps1 +++ b/functions/microwin/Microwin-RemoveProvisionedPackages.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinRemoveProvisionedPackages() { +function Microwin-RemoveProvisionedPackages() { <# .SYNOPSIS Removes AppX packages from a Windows image during MicroWin processing @@ -7,7 +7,7 @@ function Invoke-MicrowinRemoveProvisionedPackages() { No Params .EXAMPLE - Invoke-MicrowinRemoveProvisionedPackages + Microwin-RemoveProvisionedPackages #> try { diff --git a/functions/microwin/Invoke-MicrowinTestCompatibleImage.ps1 b/functions/microwin/Microwin-TestCompatibleImage.ps1 similarity index 92% rename from functions/microwin/Invoke-MicrowinTestCompatibleImage.ps1 rename to functions/microwin/Microwin-TestCompatibleImage.ps1 index c41bc276..f1305e92 100644 --- a/functions/microwin/Invoke-MicrowinTestCompatibleImage.ps1 +++ b/functions/microwin/Microwin-TestCompatibleImage.ps1 @@ -1,4 +1,4 @@ -function Invoke-MicrowinTestCompatibleImage() { +function Microwin-TestCompatibleImage() { <# .SYNOPSIS Checks the version of a Windows image and determines whether or not it is compatible with a specific feature depending on a desired version diff --git a/scripts/main.ps1 b/scripts/main.ps1 index e847644b..c1c7097c 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -413,7 +413,7 @@ $sync["ISOmanual"].add_Checked({ $sync["ISORelease"].Items.Add("24H2") | Out-Null $sync["ISORelease"].SelectedItem = "24H2" -$sync["ISOLanguage"].Items.Add("System Language ($(Invoke-MicrowinGetLangFromCulture -langName $((Get-Culture).Name)))") | Out-Null +$sync["ISOLanguage"].Items.Add("System Language ($(Microwin-GetLangFromCulture -langName $((Get-Culture).Name)))") | Out-Null if ($currentCulture -ne "English International") { $sync["ISOLanguage"].Items.Add("English International") | Out-Null }