Skip to content

Commit

Permalink
Version 3.0.2 (2024-11-14)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGeeraerts committed Nov 14, 2024
1 parent bab89ed commit d9d11bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
11 changes: 8 additions & 3 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,21 @@

---

## Version 3.0.1 (2024-11-14)
## Version 3.0.2 (2024-11-14)
#### Fixed
- APPX Package removal
- path to $APPX_LIST

---


## Version 3.0.1 (2024-11-14)
#### Fixed
- Ability to rerun APPX package removal
- OS_Caption

---

## Version 3.0.0 (2024-11-14)

#### Added
- Rewrite of the entire program.
- Interactive menu
Expand Down
19 changes: 11 additions & 8 deletions module_system_SysPrep.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
@echo Off
SETLOCAL Enableextensions
SET $SCRIPT_NAME=module_system_SysPrep
SET $SCRIPT_VERSION=3.1.0
SET $SCRIPT_BUILD=20241114 1000
SET $SCRIPT_VERSION=3.0.2
SET $SCRIPT_BUILD=20241114 1500
Title %$SCRIPT_NAME% Version: %$SCRIPT_VERSION%
mode con:cols=70
mode con:lines=40
Expand All @@ -59,8 +59,8 @@ SET "$KEYWORD_SCHEDULED_TASK=OneDrive"

:: [DELETE] Microsoft APPX Packages
:: File that contains a list of APPX packages to delete using keywords
:: relative file path
SET $APPX_LIST=config\APPX_List.txt
:: pathed to config
SET $APPX_LIST=%~dp0\config\APPX_List.txt

:: Windows Update via powershell, KB exclusion
:: NotKBArticleID with space between KB's
Expand Down Expand Up @@ -542,17 +542,20 @@ GoTo Menu
echo Installed APPX packages: >> "%$CD%\%$PROCESS_4%"
@powershell Get-AppxPackage -allusers | Findstr /I /B "Name" | sort >> "%$CD%\%$PROCESS_4%"
IF exist "%$CD%\APPX_List_FullPackage.txt" (
type "%$CD%\APPX_List_FullPackage.txt" >> type "%$CD%\APPX_List_FullPackage.log"
del /Q "%$CD%\APPX_List_FullPackage.txt"
type "%$CD%\APPX_List_FullPackage.txt" >> "%$CD%\APPX_Package.log"
)
for /f %%P in (%$APPX_LIST%) DO @powershell Get-AppxPackage %%P -allusers | FIND /I "PackageFullName" >> "%$CD%\APPX_List_FullPackage.txt"
del /Q "%$CD%\APPX_List_FullPackage.txt" 2> nul 1> nul
del /Q "%$CD%\APPX_FullPackage_Name.txt" 2> nul 1> nul
for /f %%P in (%$APPX_LIST%) DO @powershell -command "(Get-AppxPackage %%P -allusers | Out-String -Width 100)" >> "%$CD%\APPX_FullPackage_Name.txt"
FIND /I "PackageFullName" "%$CD%\APPX_FullPackage_Name.txt" >> "%$CD%\APPX_List_FullPackage.txt"
echo Removing APPX packages from APPX list...
type %$APPX_LIST%
FOR /F "tokens=3 delims= " %%P IN (%$CD%\APPX_List_FullPackage.txt) do (
FOR /F "skip=2 tokens=3 delims= " %%P IN (%$CD%\APPX_List_FullPackage.txt) do (
echo removing %%P
@powershell Remove-AppxPackage -AllUsers -Package %%P 2> nul
)
echo %TIME% [INFO] %$STEP_DESCRIP% completed! >> "%$LD%\%$MODULE_LOG%"
Timeout /T %$TIMEOUT%
:skipP4
SET $STEP_NUM=0
SET "$STEP_DESCRIP=Menu selection"
Expand Down

0 comments on commit d9d11bc

Please sign in to comment.