mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-21 13:31:30 -06:00
Improve Transcript (#2620)
* improve log logics * spelling fix * change date format
This commit is contained in:
parent
488cd8dd98
commit
6a99be9e05
@ -11,7 +11,7 @@ Function Update-WinUtilProgramWinget {
|
||||
|
||||
$host.ui.RawUI.WindowTitle = """Winget Install"""
|
||||
|
||||
Start-Transcript $ENV:TEMP\winget-update.log -Append
|
||||
Start-Transcript "$logdir\winget-update_$dateTime.log" -Append
|
||||
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent
|
||||
|
||||
}
|
||||
|
@ -27,11 +27,11 @@ if ($Run) {
|
||||
$PARAM_RUN = $true
|
||||
}
|
||||
|
||||
if (!(Test-Path -Path $ENV:TEMP)) {
|
||||
New-Item -ItemType Directory -Force -Path $ENV:TEMP
|
||||
}
|
||||
$dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
||||
|
||||
Start-Transcript $ENV:TEMP\Winutil.log -Append
|
||||
$logdir = "$env:localappdata\winutil\logs"
|
||||
[System.IO.Directory]::CreateDirectory("$logdir")
|
||||
Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append
|
||||
|
||||
# Load DLLs
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
|
Loading…
Reference in New Issue
Block a user