mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-12-17 17:55:28 +00:00
Replace-System.IO.Directory (#3794)
* Update main.ps1 * Update start.ps1 * Update main.ps1 * Update main.ps1
This commit is contained in:
parent
19b6f8abfa
commit
015f1b0709
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user