Skip to content

Commit

Permalink
Version 3.2.1 (2024-11-21)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGeeraerts committed Nov 21, 2024
1 parent 8d72b89 commit 457f7e6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
15 changes: 13 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@

---

## Version 3.2.1 (2024-11-21)
#### Fixed
- Error level setting

#### Added
- empty line at start of log for session

#### Removed
- redundent logging entries

---


## Version 3.2.0 (2024-11-20)
#### Added
- log level control
Expand All @@ -30,8 +43,6 @@
#### Fixed
- formatting

---


## Version 3.1.1 (2024-11-15)
#### Added
Expand Down
19 changes: 9 additions & 10 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.2.0
SET $SCRIPT_BUILD=20241120 0900
SET $SCRIPT_VERSION=3.2.1
SET $SCRIPT_BUILD=20241121 0930
Title %$SCRIPT_NAME% Version: %$SCRIPT_VERSION%
mode con:cols=70
mode con:lines=40
Expand Down Expand Up @@ -350,18 +350,19 @@ SET "$LD=%$WD%\%$LD%\%COMPUTERNAME%"
:logl
IF %$DEBUG% EQU 1 SET $LOG_LEVEL_ALL=1
IF %$LOG_LEVEL_ALL% EQU 1 (
SET LOG_LEVEL_INFO=1
SET LOG_LEVEL_WARN=1
SET LOG_LEVEL_ERROR=1
SET LOG_LEVEL_FATAL=1
SET LOG_LEVEL_DEBUG=1
SET LOG_LEVEL_TRACE=1
SET $LOG_LEVEL_INFO=1
SET $LOG_LEVEL_WARN=1
SET $LOG_LEVEL_ERROR=1
SET $LOG_LEVEL_FATAL=1
SET $LOG_LEVEL_DEBUG=1
SET $LOG_LEVEL_TRACE=1
)
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


:: Start :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:start
echo. >> "%$LD%\%$MODULE_LOG%"
IF %$LOG_LEVEL_INFO% EQU 1 echo %TIME% [INFO] %DATE% Start... >> "%$LD%\%$MODULE_LOG%"
IF %$LOG_LEVEL_INFO% EQU 1 echo %TIME% [INFO] Script Name: %$SCRIPT_NAME% >> "%$LD%\%$MODULE_LOG%"
IF %$LOG_LEVEL_INFO% EQU 1 echo %TIME% [INFO] Script Version: %$SCRIPT_VERSION% >> "%$LD%\%$MODULE_LOG%"
Expand Down Expand Up @@ -582,7 +583,6 @@ GoTo Menu
SET /P $USER_SID= < "%$CD%\User_SID.txt"
IF %$LOG_LEVEL_DEBUG% EQU 1 echo %TIME% [DEBUG] VARIABLE: $USER_SID {%$USER_SID%} >> "%$LD%\%$MODULE_LOG%"
@powershell -command "(Get-WmiObject Win32_UserProfile | where {$_.SID -like '%$USER_SID%'} | Remove-WmiObject)"
IF %$LOG_LEVEL_INFO% EQU 1 echo %TIME% [INFO] %$PROCESS_T_2% completed! >> "%$LD%\%$MODULE_LOG%"
type "%$CD%\User_Profiles.txt" > "%$CD%\%$PROCESS_2%"
NET USER %$LOCAL_USER% >> "%$CD%\%$PROCESS_2%"
NET USER %$LOCAL_USER% /DELETE >> "%$CD%\%$PROCESS_2%"
Expand Down Expand Up @@ -693,7 +693,6 @@ GoTo Menu
:jumpWU
CALL :banner
@powershell Write-Host "If required, computer will auto-reboot!" -ForegroundColor Yellow
echo %TIME% [INFO] Processing %$Process_T_5%... >> "%$LD%\%$MODULE_LOG%"
echo %Date% %TIME% >> "%$CD%\%$PROCESS_5%"
IF DEFINED $NotKBArticleID (
@powershell Install-WindowsUpdate -NotKBArticleID %$NotKBArticleID% -AcceptAll -AutoReboot) else (
Expand Down

0 comments on commit 457f7e6

Please sign in to comment.