Skip to content

Commit

Permalink
Version 2.2.2 (2022-07-08)
Browse files Browse the repository at this point in the history
- see change log for details
  • Loading branch information
DavidGeeraerts committed Jul 8, 2022
1 parent a984110 commit fa25003
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
11 changes: 9 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@

---

## Version 2.2.1 (2022-06-03)
## Version 2.2.2 (2022-07-08)
#### Fixed
- Bitlocker check
- APPX with -AllUsers

#### Changed
- APPX package query goes to file

---


## Version 2.2.1 (2022-06-03)
#### Fixed
- Bitlocker check

## Version 2.2.0 (2022-06-03)
#### Added
- Bitlocker check and unlocker
Expand Down
8 changes: 4 additions & 4 deletions Windows_Appx_Package_CleanUp.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This must be done right before running sysprep
## Needs to be performed for local administrator
Get-AppxPackage Microsoft.OneDriveSync | Remove-AppxPackage
Get-AppxPackage MicrosoftWindows.Client.WebExperience | Remove-AppxPackage
Get-AppxPackage Microsoft.OneDriveSync | Remove-AppxPackage -AllUsers
Get-AppxPackage MicrosoftWindows.Client.WebExperience | Remove-AppxPackage -AllUsers


# Get package full name
@powershell Get-AppxPackage Microsoft.OneDriveSync | FIND /I "PackageFullName"
@powershell Remove-AppxPackage <$PackageFullName>
@powershell Remove-AppxPackage -AllUsers <$PackageFullName>


FOR /F "tokens=3 delims= " %P IN ('@powershell Get-AppxPackage Microsoft.OneDriveSync ^| FIND /I "PackageFullName"') DO SET $PACKAGE_NAME=%P
Expand All @@ -20,4 +20,4 @@ FOR /F "tokens=3 delims= " %P IN ('@powershell Get-AppxPackage Microsoft.OneDriv

FOR /F "tokens=3 delims= " %P IN ('@powershell Get-AppxPackage MicrosoftWindows.Client.WebExperience ^| FIND /I "PackageFullName"') DO SET $PACKAGE_NAME=%P

@powershell Remove-AppxPackage %$PACKAGE_NAME%
@powershell Remove-AppxPackage -AllUsers %$PACKAGE_NAME%
11 changes: 6 additions & 5 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=2.2.1
SET $SCRIPT_BUILD=20220603 1500
SET $SCRIPT_VERSION=2.2.2
SET $SCRIPT_BUILD=20220708 0800
Title %$SCRIPT_NAME% Version: %$SCRIPT_VERSION%
mode con:cols=70
mode con:lines=40
Expand Down Expand Up @@ -719,17 +719,18 @@ REM This would need to be a scheduled task to run as an administrator
echo %TIME% [INFO] AppxPackage Cleanup... >> "%$LD%\%$MODULE_LOG%"
echo %TIME% [INFO] Current User: %USERNAME% >> "%$LD%\%$MODULE_LOG%"
SET $PACKAGE_NAME=
FOR /F "tokens=3 delims= " %%P IN ('@powershell Get-AppxPackage Microsoft.OneDriveSync ^| FIND /I "PackageFullName"') DO SET $PACKAGE_NAME=%%P
FOR /F "tokens=3 delims= " %%P IN ('@powershell Get-AppxPackage Microsoft.OneDriveSync ^| FIND /I "PackageFullName"') DO echo %%P> "%VD%\PackageFullName.txt"
SET /P $PACKAGE_NAME= < "%VD%\PackageFullName.txt"
echo %TIME% [DEBUG] $PACKAGE_NAME: %$PACKAGE_NAME% >> "%$LD%\%$MODULE_LOG%"
IF NOT DEFINED $PACKAGE_NAME GoTo skipAPX1
@powershell Remove-AppxPackage -Package %$PACKAGE_NAME% 2> nul
@powershell Remove-AppxPackage -AllUsers -Package %$PACKAGE_NAME% 2> nul
:skipAPX1
:: MicrosoftWindows.Client.WebExperience
SET $PACKAGE_NAME=
FOR /F "tokens=3 delims= " %%P IN ('@powershell Get-AppxPackage MicrosoftWindows.Client.WebExperience ^| FIND /I "PackageFullName"') DO SET $PACKAGE_NAME=%%P
echo %TIME% [DEBUG] $PACKAGE_NAME: %$PACKAGE_NAME% >> "%$LD%\%$MODULE_LOG%"
IF NOT DEFINED $PACKAGE_NAME GoTo skipAPX2
@powershell Remove-AppxPackage %$PACKAGE_NAME% 2> nul
@powershell Remove-AppxPackage -AllUsers -Package %$PACKAGE_NAME% 2> nul
:skipAPX2
Goto :eof

Expand Down
6 changes: 3 additions & 3 deletions modules_system_SysPrep_Sync.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ SETLOCAL Enableextensions
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

SET $SCRIPT_NAME=module_Flash_Sync
SET $SCRIPT_VERSION=0.2.0
SET $SCRIPT_BUILD=20201109-0800
SET $SCRIPT_VERSION=0.3.0
SET $SCRIPT_BUILD=20220708 0800

Title %$SCRIPT_NAME% %$SCRIPT_VERSION%
Prompt mrE$G
Expand Down Expand Up @@ -79,7 +79,7 @@ ECHO.

:sync
attrib -A /S
robocopy "%$REPO_MODULE%" "%$VOLUME%\module_system_SysPrep" /A+:A /MIR /S /E /R:1 /W:5 /XD .git /XF *.old modules_system_SysPrep_Sync.cmd .gitignore CODEOWNERS *.backup
robocopy "%$REPO_MODULE%" "%$VOLUME%\module_system_SysPrep" /A+:A /MIR /S /E /R:1 /W:5 /XD .git /XF *.old modules_system_SysPrep_Sync.cmd modules_system_SysPrep_Sync_Dev.cmd .gitignore CODEOWNERS *.backup
robocopy "%$REPO_UNATTEND%" %$VOLUME%\Unattend *unattend.xml /A+:A /R:1 /W:5
IF %ERRORLEVEL% EQU 0 GoTo skipU
:skipU
Expand Down

0 comments on commit fa25003

Please sign in to comment.