Skip to content

Windows command

命令

添加当前folder path到system path

shell
setx path "%path%;%cd%"

显示进程及命令

powershell
Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -ne $null } | Select-Object -Property ProcessId, Name, CommandLine

get wallpaper now desktop

powershell
$TIC=(Get-ItemProperty 'HKCU:\Control Panel\Desktop' TranscodedImageCache -ErrorAction Stop).TranscodedImageCache; [System.Text.Encoding]::Unicode.GetString($TIC) -replace '(.+)([A-Z]:[0-9a-zA-Z\\])+','$2'

Released under the MIT License.