Thursday, February 16, 2023

laptop auto wake up right after hibernate or sleep

 steps to troubleshoot:
admin cmd:  powercfg -lastwake

    Friendly Name:

    Description: High Definition Audio Controller

    Manufacturer: Microsoft


This showed sound card is causing the problem, but this one in fact is not the sound card(realtek in my case). The culprit is "Intel(R) Display Audio" in Device Manager - Sound video and game controllers.

As of 2023, update Intel graphic card drivers did not solve the issue. 

Disable this "Intel(R) Display Audio" would solve the problem. It is used by hdmi / direct Wifi to allow tv to play sound.

disable windows 10 update

In file Property - Security - Advanced , edit to add DENY Read,Write permissions:
(Administrators should allow to Read/Change Permissions though)
C:\windows\system32\wuaueng.dll
C:\windows\system32\wuauclt.exe   
C:\windows\system32\usosvc.dll
C:\windows\system32\WaaSMedicSvc.dll

Windows 10 optimization & some windows registry keys

open lid option: admin cmd:
powercfg -attributes SUB_BUTTONS 99ff10e7-23b1-4c07-a9d1-5c3206d741b4 -ATTRIB_HIDE
powercfg -attributes SUB_BUTTONS 99ff10e7-23b1-4c07-a9d1-5c3206d741b4 +ATTRIB_HIDE

powershell: Set-MpPreference -DisableScanningNetworkFiles 1

multiple "Language Pack Removal" found in RestorePoint:
in Task Scheduler: disable Microsoft\Windows\MUI\LPRemove

disable service:  (minimal/limited networking)
SysMain  (superfetch)
Print Spooler (if not using printer)
Connected user experiences and telemetry
nahimic service (if any)
net.tcp port sharing service
routing and remote access
windows push notification system service
   ~ user service (might affect Alarm&Clock countDown)

which scheduler run at idle:
powershell: Get-ScheduledTask | Where-Object { $_.State -ne "Disabled" } | Select-Object TaskName, TaskPath, Triggers | Where-Object { $_.Triggers -match "MSFT_TaskIdleTrigger" }


HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Window Search
DWORD "AllowCortana"=0

HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRemoteShutdownRPCInterface=1

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\DisableRpcOverTcp=1

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\
DWORD DisableRealtimeMonitoring=1    use at your own risk

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting
DWORD Disabled=1

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}\Commands\on-logon-autolaunch
DWORD AutoRunOnLogon=0

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}\Commands\on-logon-startup-boost
DWORD AutoRunOnLogon=0

Chrome to disable periodically scan malware:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
this key exist wld cause "browser is managed by your organization"

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection\
"AllowTelemetry"=0
"DisableOneSettingsDownloads"=1
DoNotShowFeedbackNotifications=1

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
DWORD DisableBandwidthThrottling=1


Windows 10 clock to show Seconds

 (dont run as admin)  HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced   ->  New > DWORD (32-bit)  ->  ShowSecondsInSystemClock=1

Sunday, December 31, 2017

trim mp3 files using ffmpeg, works for video too

ffprobe.exe to get duration of MP3 in number of seconds.
   ffprobe  -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 file.mp3

ffmpeg.exe to trim away first 8 seconds, end at 999 seconds of All mp3 files in the working folder.
  ffmpeg.exe -ss 8 -t   999  -i input.mp3 -acodec copy output.mp3

Trim from 00:02:54.583 to end of file:
 ffmpeg  -ss 00:02:54.583 -i input.mp3 -acodec copy output.mp3

Works for video too:
ffmpeg -ss [start] -i in.mp4 -t [duration] -c copy out.mp4
ffmpeg -ss [start] -i in.mp4 -t [duration] -c:v libx264 -c:a aac -strict experimental -b:a 128k out.mp4


C:\ffmpeg Folder\mp3files\go.bat

echo "==========" > done.txt
for %%f in (*.mp3) do  (
    echo|set /p="..\ffmpeg.exe                         %%f                           " >> done.txt   
  ..\ffprobe  -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1  %%f  >> done.txt
)
rem Open done.txt in Excel, deduct 18 from the -t seconds     
rem (objective is to cut first 8 seconds, trim last 10 seconds of each mp3) 
rem use =concate() to reconstruct the command list, to put to new.bat
rem rearrange param, -ss and -t must precede -i

Saturday, December 30, 2017

how to turn off Accessibility button function at Windows 7's login screen

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Utilman.exe" /v "Debugger" /t REG_SZ /d "systray.exe" /f

source: https://superuser.com/questions/196989/how-to-remove-or-disable-ease-of-access-button-on-windows-7-login-screen