Replace-System.IO.Directory (#3794)

* Update main.ps1

* Update start.ps1

* Update main.ps1

* Update main.ps1
This commit is contained in:
Gabi 2025-12-11 21:34:03 +02:00 committed by GitHub
parent 19b6f8abfa
commit 015f1b0709
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -451,13 +451,11 @@ $NavLogoPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25)) | Out-N
$winutildir = @{} $winutildir = @{}
# Set the path for the winutil directory # Set the path for the winutil directory
$winutildir["path"] = "$env:LOCALAPPDATA\winutil\" $winutildir = "$env:LocalAppData\winutil\"
[System.IO.Directory]::CreateDirectory($winutildir["path"]) | Out-Null New-Item $winutildir -ItemType Directory -Force | Out-Null
$winutildir["logo.ico"] = $winutildir["path"] + "cttlogo.ico" if (Test-Path "$winutildir\logo.ico") {
$sync["logorender"] = "$winutildir\logo.ico"
if (Test-Path $winutildir["logo.ico"]) {
$sync["logorender"] = $winutildir["logo.ico"]
} else { } else {
$sync["logorender"] = (Invoke-WinUtilAssets -Type "Logo" -Size 90 -Render) $sync["logorender"] = (Invoke-WinUtilAssets -Type "Logo" -Size 90 -Render)
} }

View File

@ -80,7 +80,7 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
$dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss" $dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
$logdir = "$env:localappdata\winutil\logs" $logdir = "$env:localappdata\winutil\logs"
[System.IO.Directory]::CreateDirectory("$logdir") | Out-Null New-Item $logdir -ItemType Directory -Force | Out-Null
Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append -NoClobber | Out-Null Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append -NoClobber | Out-Null
# Set PowerShell window title # Set PowerShell window title