mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-06 06:38:31 +00:00
Unify $winutildir (#4004)
This commit is contained in:
@@ -129,8 +129,8 @@ function Invoke-WinutilThemeChange {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$LightPreferencePath = "$env:LOCALAPPDATA\winutil\LightTheme.ini"
|
$LightPreferencePath = "$winutildir\LightTheme.ini"
|
||||||
$DarkPreferencePath = "$env:LOCALAPPDATA\winutil\DarkTheme.ini"
|
$DarkPreferencePath = "$winutildir\DarkTheme.ini"
|
||||||
|
|
||||||
if ($init) {
|
if ($init) {
|
||||||
Set-WinutilTheme -currentTheme "shared"
|
Set-WinutilTheme -currentTheme "shared"
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ function Set-PackageManagerPreference {
|
|||||||
[PackageManagers]$preferredPackageManager
|
[PackageManagers]$preferredPackageManager
|
||||||
)
|
)
|
||||||
|
|
||||||
$preferencePath = "$env:LOCALAPPDATA\winutil\preferences.ini"
|
$preferencePath = "$winutildir\preferences.ini"
|
||||||
$oldChocoPath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
$oldChocoPath = "$winutildir\preferChocolatey.ini"
|
||||||
|
|
||||||
#Try loading from file if no argument given.
|
#Try loading from file if no argument given.
|
||||||
if ($null -eq $preferredPackageManager) {
|
if ($null -eq $preferredPackageManager) {
|
||||||
|
|||||||
@@ -425,12 +425,6 @@ $sync["Form"].Add_Loaded({
|
|||||||
$NavLogoPanel = $sync["Form"].FindName("NavLogoPanel")
|
$NavLogoPanel = $sync["Form"].FindName("NavLogoPanel")
|
||||||
$NavLogoPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25)) | Out-Null
|
$NavLogoPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25)) | Out-Null
|
||||||
|
|
||||||
# Initialize the hashtable
|
|
||||||
$winutildir = @{}
|
|
||||||
|
|
||||||
# Set the path for the winutil directory
|
|
||||||
$winutildir = "$env:LocalAppData\winutil\"
|
|
||||||
New-Item $winutildir -ItemType Directory -Force | Out-Null
|
|
||||||
|
|
||||||
if (Test-Path "$winutildir\logo.ico") {
|
if (Test-Path "$winutildir\logo.ico") {
|
||||||
$sync["logorender"] = "$winutildir\logo.ico"
|
$sync["logorender"] = "$winutildir\logo.ico"
|
||||||
|
|||||||
@@ -79,7 +79,11 @@ 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"
|
# Set the path for the winutil directory
|
||||||
|
$winutildir = "$env:LocalAppData\winutil"
|
||||||
|
New-Item $winutildir -ItemType Directory -Force | Out-Null
|
||||||
|
|
||||||
|
$logdir = "$winutildir\logs"
|
||||||
New-Item $logdir -ItemType Directory -Force | 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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user