Update log path and name

## Purpose :
- Fix #17 
- Fix #18 
> This will avoid collision and let user retrive easely the log file. 

## Details :
- Using subexpression `$(get-date -f yyyyMMdd_HHmms)` inside the log file name.
- Changing path of the log to `$PSScriptRoot` . (so iso, log, script will be at the same place.)
This commit is contained in:
Old Character
2025-09-07 00:00:24 +02:00
committed by GitHub
parent bde07ab406
commit e5752915f6

View File

@@ -19,12 +19,12 @@
.\tiny11maker.ps1 -SCRATCH D -ISO E .\tiny11maker.ps1 -SCRATCH D -ISO E
.\tiny11maker.ps1 .\tiny11maker.ps1
*If you put only the value in parameters the first one must be the iso mounted. The second is the scratch drive. *If you ordinal parameters the first one must be the mounted iso. The second is the scratch drive.
prefer the use of "-ISO" as you can put in the order you want. prefer the use of full named parameter (eg: "-ISO") as you can put in the order you want.
.NOTES .NOTES
Auteur: ntdevlabs Auteur: ntdevlabs
Date: 05-06-24 Date: 06-09-25
#> #>
#---------[ Parameters ]---------# #---------[ Parameters ]---------#
@@ -101,7 +101,7 @@ if (-not (Test-Path -Path "$PSScriptRoot/autounattend.xml")) {
} }
# Start the transcript and prepare the window # Start the transcript and prepare the window
Start-Transcript -Path "$ScratchDisk\tiny11.log" Start-Transcript -Path "$PSScriptRoot\tiny11_$(get-date -f yyyyMMdd_HHmms).log"
$Host.UI.RawUI.WindowTitle = "Tiny11 image creator" $Host.UI.RawUI.WindowTitle = "Tiny11 image creator"
Clear-Host Clear-Host
@@ -539,3 +539,4 @@ Stop-Transcript
exit exit