winutil icon indicating copy to clipboard operation
winutil copied to clipboard

Feature/simplelogging

Open DeveloperDurp opened this issue 3 years ago • 0 comments

For #390

Example output.

Winutil will use $ENV:TEMP\winutil.log Winget will use $ENV:TEMP\winget-{winget application being installed}.log

Location of the log will also show up at the start of the console image

Winutil

**********************
Windows PowerShell transcript start
Start time: 20221126063554
Username: DESKTOP-E8D27G7\user
RunAs User: DESKTOP-E8D27G7\user
Configuration Name: 
Machine: DESKTOP-E8D27G7 (Microsoft Windows NT 10.0.22000.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -f .\winutil.ps1
Process ID: 9676
PSVersion: 5.1.22000.832
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22000.832
BuildVersion: 10.0.22000.832
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\Users\user\AppData\Local\Temp\Winutil.log
Chocolatey Version 1.1.0 is already installed

    CCCCCCCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
 CCC::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T
CC:::::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T
C:::::CCCCCCCC::::CT:::::TT:::::::TT:::::TT:::::TT:::::::TT:::::T
C:::::C       CCCCCCTTTTTT  T:::::T  TTTTTTTTTTTT  T:::::T  TTTTTT
C:::::C                     T:::::T                T:::::T
C:::::C                     T:::::T                T:::::T
C:::::C                     T:::::T                T:::::T
C:::::C                     T:::::T                T:::::T
C:::::C                     T:::::T                T:::::T
C:::::C                     T:::::T                T:::::T
C:::::C       CCCCCC        T:::::T                T:::::T
C:::::CCCCCCCC::::C      TT:::::::TT            TT:::::::TT
CC:::::::::::::::C       T:::::::::T            T:::::::::T
CCC::::::::::::C         T:::::::::T            T:::::::::T
  CCCCCCCCCCCCC          TTTTTTTTTTT            TTTTTTTTTTT

====Chris Titus Tech=====
=====Windows Toolbox=====
Checking if Winget is Installed...
Winget Already Installed
Git.Git
=================================
---  Installs are Finished    ---
=================================
Setting BIOS time to UTC...
Set-ItemProperty : Requested registry access is not allowed.
At C:\Users\user\Documents\GitHub\winutil\winutil.ps1:826 char:13
+             Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Co ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (HKEY_LOCAL_MACH...ZoneInformation:String) [Set-ItemProperty], 
SecurityException
    + FullyQualifiedErrorId : System.Security.SecurityException,Microsoft.PowerShell.Commands.SetItemPropertyCommand
Set-ItemProperty : Requested registry access is not allowed.
At C:\Users\user\Documents\GitHub\winutil\winutil.ps1:826 char:13
+             Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Co ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (HKEY_LOCAL_MACH...ZoneInformation:String) [Set-ItemProperty], SecurityException
    + FullyQualifiedErrorId : System.Security.SecurityException,Microsoft.PowerShell.Commands.SetItemPropertyCommand

=================================
--     Tweaks are Finished    ---
=================================
PS>$global:?
True
**********************
Windows PowerShell transcript end
End time: 20221126063632
**********************

Winget

**********************
Windows PowerShell transcript start
Start time: 20221126070810
Username: DESKTOP-E8D27G7\user
RunAs User: DESKTOP-E8D27G7\user
Configuration Name: 
Machine: DESKTOP-E8D27G7 (Microsoft Windows NT 10.0.22000.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command Start-Transcript C:\Users\user\AppData\Local\Temp\winget-Git.Git.log -Append; winget install -e --accept-source-agreements --accept-package-agreements --silent Git.Git | Out-Host
Process ID: 16304
PSVersion: 5.1.22000.832
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22000.832
BuildVersion: 10.0.22000.832
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\Users\user\AppData\Local\Temp\winget-Git.Git.log
   -\|/-\|/-\|/
Failed in attempting to update the source: winget
Found Git [Git.Git] Version 2.38.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/git-for-windows/git/releases/download/v2.38.1.windows.1/Git-2.38.1-64-bit.exe
   -\|/

  ΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆ  1024 KB / 50.8 MB
  ΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆ  13.0 MB / 50.8 MB
  ΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆ  23.0 MB / 50.8 MB
  ΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆΓûÆ  33.0 MB / 50.8 MB
  ΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûÆΓûÆΓûÆΓûÆΓûÆ  43.0 MB / 50.8 MB
  ΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûêΓûê  50.8 MB / 50.8 MB
Successfully verified installer hash
   -
Starting package install...
   -\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\
Successfully installed
PS>$global:?
True
**********************
Windows PowerShell transcript end
End time: 20221126070858
**********************

DeveloperDurp avatar Nov 26 '22 13:11 DeveloperDurp