LiveKernelEvent 141

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Malnutrition
    PCHF Moderator
    • Jul 2016
    • 7045

    #76
    Once installed, and everything else is completed.
    Copy the content of the code box below.
    Open Powershell as admin.
    windows key and r at the same time.
    Type powershell
    Hit ok
    Paste the content of the code box and hit enter.
    Reboot the machine after, this will disable useless services.
    Code:
    # Elevate privileges if not already running as administrator
    if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
        Start-Process powershell -Verb RunAs -ArgumentList @(
            '-NoProfile','-ExecutionPolicy','Bypass',
            '-File', "`"$PSCommandPath`""
        )
        exit
    }
    
    try {
    Checkpoint-Computer -Description 'PreBatchPCHF' -RestorePointType MODIFY_SETTINGS
    Write-Host 'Restore point created.'
    }
    catch {
    Write-Warning "Restore-point creation failed: $_"
    }
    
    Get-Service | Select Name,DisplayName,StartType |
        Export-Csv "$env:USERPROFILE\Desktop\Services-Before-$(Get-Date -f yyyyMMddHHmm).csv" `
                   -NoType
    Write-Host "Service state exported to Desktop."
    
    $servicesToDisable = @(
        "AppVClient","DiagTrack","BDESVC","Browser","DeviceAssociationService",
        "DialogBlockingService","DiagTrack","dmwappushservice","DmEnrollmentSvc",
        "EntAppSvc","Fax","HgClientService","HvHost","InventorySvc","lfsvc","MapsBroker",
        "NetTcpPortSharing","NgcCtnrSvc","NgcSvc","OneDrive","p2psvc","PhoneSvc",
        "PNRPsvc","PrintNotify","QWAVE","RasAuto","RasMan","RemoteRegistry","RetailDemo",
        "ssh-agent","SstpSvc","TabletInputService","vmicguestinterface","vmicheartbeat",
        "vmickvpexchange","vmicrdv","vmicshutdown","vmictimesync","vmicvmsession",
        "vmicvss","WalletService","WerSvc","WpcMonSvc","XblAuthManager","XblGameSave",
        "XboxNetApiSvc","AdobeARMservice","BITS","DoSvc","edgeupdate","edgeupdatem",
        "gupdate","gupdatem","HomeGroupListener","HomeGroupProvider",
        "MicrosoftEdgeUpdateService","PcaSvc","SharedAccess","SysMain","TrkWks",
        "UsoSvc","WerSvc","WMPNetworkSvc","WSearch","ClipSVC","TokenBroker",
        "WaaSMedicSvc","WaasPushService","PimIndexMaintenanceSvc","CaptureService",
        "PrintWorkflowUserSvc","XboxGipSvc","GamingServices","GamingServicesNet",
        "VacSvc","DbgSvc","MessagingService"
    ) | Sort-Object -Unique
    
    foreach ($svcName in $servicesToDisable) {
        if ($svc = Get-Service -Name $svcName -ErrorAction SilentlyContinue) {
            try { Stop-Service $svc -Force -ErrorAction Stop }
            catch { Write-Warning "Could not stop $svcName : $_" }
            try { Set-Service  $svc -StartupType Disabled }
            catch { Write-Warning "Could not disable $svcName : $_" }
            Write-Host "Disabled: $svcName"
        } else {
            Write-Verbose "Service not found: $svcName"
        }
    }
    
    $tempFolders = @("C:\Windows\Temp\*","$env:TEMP\*")
    foreach ($path in $tempFolders) {
        try { Remove-Item $path -Recurse -Force -ErrorAction Stop }
        catch { Write-Warning "Couldn't remove some items in $path" }
    }
    Write-Host "Temp folders cleaned."
    
    Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' `
                     -Name 'HiberbootEnabled' -Value 0
    Write-Host "Fast Startup disabled."
    
    Write-Host "`nScript complete. Reboot when convenient."

    Comment

    • Malnutrition
      PCHF Moderator
      • Jul 2016
      • 7045

      #77
      Once installed, and everything else is completed.
      Copy the content of the code box below.
      Open Powershell as admin.
      windows key and r at the same time.
      Type powershell
      Hit ok
      Paste the content of the code box and hit enter.
      Reboot the machine after, this will disable useless services.
      Code:
      # Elevate privileges if not already running as administrator
      if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
          Start-Process powershell -Verb RunAs -ArgumentList @(
              '-NoProfile','-ExecutionPolicy','Bypass',
              '-File', "`"$PSCommandPath`""
          )
          exit
      }
      
      try {
      Checkpoint-Computer -Description 'PreBatchPCHF' -RestorePointType MODIFY_SETTINGS
      Write-Host 'Restore point created.'
      }
      catch {
      Write-Warning "Restore-point creation failed: $_"
      }
      
      Get-Service | Select Name,DisplayName,StartType |
          Export-Csv "$env:USERPROFILE\Desktop\Services-Before-$(Get-Date -f yyyyMMddHHmm).csv" `
                     -NoType
      Write-Host "Service state exported to Desktop."
      
      $servicesToDisable = @(
          "AppVClient","DiagTrack","BDESVC","Browser","DeviceAssociationService",
          "DialogBlockingService","DiagTrack","dmwappushservice","DmEnrollmentSvc",
          "EntAppSvc","Fax","HgClientService","HvHost","InventorySvc","lfsvc","MapsBroker",
          "NetTcpPortSharing","NgcCtnrSvc","NgcSvc","OneDrive","p2psvc","PhoneSvc",
          "PNRPsvc","PrintNotify","QWAVE","RasAuto","RasMan","RemoteRegistry","RetailDemo",
          "ssh-agent","SstpSvc","TabletInputService","vmicguestinterface","vmicheartbeat",
          "vmickvpexchange","vmicrdv","vmicshutdown","vmictimesync","vmicvmsession",
          "vmicvss","WalletService","WerSvc","WpcMonSvc","XblAuthManager","XblGameSave",
          "XboxNetApiSvc","AdobeARMservice","BITS","DoSvc","edgeupdate","edgeupdatem",
          "gupdate","gupdatem","HomeGroupListener","HomeGroupProvider",
          "MicrosoftEdgeUpdateService","PcaSvc","SharedAccess","SysMain","TrkWks",
          "UsoSvc","WerSvc","WMPNetworkSvc","WSearch","ClipSVC","TokenBroker",
          "WaaSMedicSvc","WaasPushService","PimIndexMaintenanceSvc","CaptureService",
          "PrintWorkflowUserSvc","XboxGipSvc","GamingServices","GamingServicesNet",
          "VacSvc","DbgSvc","MessagingService"
      ) | Sort-Object -Unique
      
      foreach ($svcName in $servicesToDisable) {
          if ($svc = Get-Service -Name $svcName -ErrorAction SilentlyContinue) {
              try { Stop-Service $svc -Force -ErrorAction Stop }
              catch { Write-Warning "Could not stop $svcName : $_" }
              try { Set-Service  $svc -StartupType Disabled }
              catch { Write-Warning "Could not disable $svcName : $_" }
              Write-Host "Disabled: $svcName"
          } else {
              Write-Verbose "Service not found: $svcName"
          }
      }
      
      $tempFolders = @("C:\Windows\Temp\*","$env:TEMP\*")
      foreach ($path in $tempFolders) {
          try { Remove-Item $path -Recurse -Force -ErrorAction Stop }
          catch { Write-Warning "Couldn't remove some items in $path" }
      }
      Write-Host "Temp folders cleaned."
      
      Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' `
                       -Name 'HiberbootEnabled' -Value 0
      Write-Host "Fast Startup disabled."
      
      Write-Host "`nScript complete. Reboot when convenient."

      Comment

      • Malnutrition
        PCHF Moderator
        • Jul 2016
        • 7045

        #78
        After this give your game a test let us know, we can further reduce if needed.

        Comment

        • Malnutrition
          PCHF Moderator
          • Jul 2016
          • 7045

          #79
          After this give your game a test let us know, we can further reduce if needed.

          Comment

          • Sunny
            PCHF Member
            • May 2025
            • 69

            #80
            Hey, real quick. I’ve disabled updates and protected service settings in WUB.
            I’ve also prepped the necessary changes in regedit but I can’t copy the elevated command prompt lines (reg add) that you shared without going online.

            I could maually type them if I knew how to go down a line without pressing enter. Alternatively, do you think WUB will be sufficient for the short time it takes me to go online and copy the reg add stuff?

            (I’m just up to installing chipset drivers currently)

            Comment

            • Sunny
              PCHF Member
              • May 2025
              • 69

              #81
              Hey, real quick. I’ve disabled updates and protected service settings in WUB.
              I’ve also prepped the necessary changes in regedit but I can’t copy the elevated command prompt lines (reg add) that you shared without going online.

              I could maually type them if I knew how to go down a line without pressing enter. Alternatively, do you think WUB will be sufficient for the short time it takes me to go online and copy the reg add stuff?

              (I’m just up to installing chipset drivers currently)

              Comment

              • Malnutrition
                PCHF Moderator
                • Jul 2016
                • 7045

                #82
                yes so long as you have wub updates disabled you will be fine .

                Wub_x64.exe =
                [ATTACH type=“full” alt=“1747715292481.webp”]15425[/ATTACH]

                For extra measure, simple wall configure.

                Ms Spying and telemetry = Block
                Ms Update = block

                [ATTACH type=“full” size=“613x263”]15427[/ATTACH]

                Comment

                • Malnutrition
                  PCHF Moderator
                  • Jul 2016
                  • 7045

                  #83
                  yes so long as you have wub updates disabled you will be fine .

                  Wub_x64.exe =
                  [ATTACH type=“full” alt=“1747715292481.webp”]15425[/ATTACH]

                  For extra measure, simple wall configure.

                  Ms Spying and telemetry = Block
                  Ms Update = block

                  [ATTACH type=“full” size=“613x263”]15427[/ATTACH]

                  Comment

                  • Sunny
                    PCHF Member
                    • May 2025
                    • 69

                    #84
                    Sweet. It’s all done.
                    There were so many distractions (and a power cut) throughout the process but it is complete.
                    Before I start downloading apps and programs, I’d like to ask if you have any input on:
                    • Chrome vs Firefox (I’ve always used chrome but I’ve heard Firefox has its advantages)
                    • Should I endeavour to keep all apps and downloads off the OS partition? (games are obviously on the other partition already).
                    • Are there any other crucial drivers to install besides the ones from the MB/GPU sites that I’ve already done?

                    Thanks in advance… Even if my LiveKernelEvent 141 errors persist after all this (probably hardware in that case), I can say that it was time well spent. Having a less bloated OS and better data management is going to be so good going forward.

                    Comment

                    • Sunny
                      PCHF Member
                      • May 2025
                      • 69

                      #85
                      Sweet. It’s all done.
                      There were so many distractions (and a power cut) throughout the process but it is complete.
                      Before I start downloading apps and programs, I’d like to ask if you have any input on:
                      • Chrome vs Firefox (I’ve always used chrome but I’ve heard Firefox has its advantages)
                      • Should I endeavour to keep all apps and downloads off the OS partition? (games are obviously on the other partition already).
                      • Are there any other crucial drivers to install besides the ones from the MB/GPU sites that I’ve already done?

                      Thanks in advance… Even if my LiveKernelEvent 141 errors persist after all this (probably hardware in that case), I can say that it was time well spent. Having a less bloated OS and better data management is going to be so good going forward.

                      Comment

                      • Sunny
                        PCHF Member
                        • May 2025
                        • 69

                        #86
                        Well now I realize I should’ve got my own browser before running PrivWindoze
                        It’s a bit harder to do when MS egde isn’t there…

                        Comment

                        • Sunny
                          PCHF Member
                          • May 2025
                          • 69

                          #87
                          Well now I realize I should’ve got my own browser before running PrivWindoze
                          It’s a bit harder to do when MS egde isn’t there…

                          Comment

                          • Malnutrition
                            PCHF Moderator
                            • Jul 2016
                            • 7045

                            #88
                            • Chrome vs Firefox (I’ve always used chrome but I’ve heard Firefox has its advantages)

                            I prefer firefox, more privacy oriented than google IMO Also-- Ublock Origin
                            • Should I endeavour to keep all apps and downloads off the OS partition? (games are obviously on the other partition already).

                            Yes, since your partition is 256 that can fill fast leave the OS with room to romp, if you have the available space elsewhere.
                            Originally posted by Sunny
                            • Are there any other crucial drivers to install besides the ones from the MB/GPU sites that I’ve already done?
                            Open device manager, any yellow ? marks or anything indicating issues of missing drivers? If so use the site I linked to. If not then leave drivers alone. Never update them unless there is an issue, if it works leave it alone. A lot of times games require updated GPU drivers that is the execption to the rule, always use DDU to clean remnants of old ones.
                            Well now I realize I should’ve got my own browser before running PrivWindoze

                            windows key and r at the same time. Type
                            [COLOR=rgb(243, 121, 52)]mshta http://google.com

                            [COLOR=rgb(65, 168, 95)]You can use this to google for firefox or chrome to download a browser. Make certain there is a space between the[COLOR=rgb(243, 121, 52)] a[COLOR=rgb(65, 168, 95)] and [COLOR=rgb(61, 142, 185)]h[COLOR=rgb(65, 168, 95)] as i have it. Type one letter then click yes when you get an error about scripts, then click google search you will then be able to freely type.[/COLOR][/COLOR][/COLOR][/COLOR][/COLOR][/COLOR]
                            [COLOR=rgb(243, 121, 52)][COLOR=rgb(65, 168, 95)][COLOR=rgb(243, 121, 52)][COLOR=rgb(65, 168, 95)][COLOR=rgb(61, 142, 185)][COLOR=rgb(65, 168, 95)][/color][/color][/color][/color][/color][/color]

                            Comment

                            • Malnutrition
                              PCHF Moderator
                              • Jul 2016
                              • 7045

                              #89
                              • Chrome vs Firefox (I’ve always used chrome but I’ve heard Firefox has its advantages)

                              I prefer firefox, more privacy oriented than google IMO Also-- Ublock Origin
                              • Should I endeavour to keep all apps and downloads off the OS partition? (games are obviously on the other partition already).

                              Yes, since your partition is 256 that can fill fast leave the OS with room to romp, if you have the available space elsewhere.
                              Originally posted by Sunny
                              • Are there any other crucial drivers to install besides the ones from the MB/GPU sites that I’ve already done?
                              Open device manager, any yellow ? marks or anything indicating issues of missing drivers? If so use the site I linked to. If not then leave drivers alone. Never update them unless there is an issue, if it works leave it alone. A lot of times games require updated GPU drivers that is the execption to the rule, always use DDU to clean remnants of old ones.
                              Well now I realize I should’ve got my own browser before running PrivWindoze

                              windows key and r at the same time. Type
                              [COLOR=rgb(243, 121, 52)]mshta http://google.com

                              [COLOR=rgb(65, 168, 95)]You can use this to google for firefox or chrome to download a browser. Make certain there is a space between the[COLOR=rgb(243, 121, 52)] a[COLOR=rgb(65, 168, 95)] and [COLOR=rgb(61, 142, 185)]h[COLOR=rgb(65, 168, 95)] as i have it. Type one letter then click yes when you get an error about scripts, then click google search you will then be able to freely type.[/COLOR][/COLOR][/COLOR][/COLOR][/COLOR][/COLOR]
                              [COLOR=rgb(243, 121, 52)][COLOR=rgb(65, 168, 95)][COLOR=rgb(243, 121, 52)][COLOR=rgb(65, 168, 95)][COLOR=rgb(61, 142, 185)][COLOR=rgb(65, 168, 95)][/color][/color][/color][/color][/color][/color]

                              Comment

                              • Sunny
                                PCHF Member
                                • May 2025
                                • 69

                                #90
                                When i try to run google, a Pop-up is saying I need to “get an app to open this ‘http’ link”. It provides a link to the MS store.
                                I can see firefox and edge in the microsoft store but anything i click on just leads to a “something went wrong. Try again later” screen…

                                Perhaps I need to give something internet access in Simplewall momentarily.
                                Sorry, I’ve made yet more work.

                                Other than that, it’s all bueno. Thanks for the tips.

                                Comment

                                Working...