windows系统操作¶
cmd¶
cmd.exe 一些常见的启动参数介绍_脚本教程网 (xiuzhanwang.com)
/c
运行之后自动结束进程
/k
运行之后不自动结束
start /min
最小化运行, 不出现窗口
隐藏CMD运行
调用cmd命令不显示命令窗口_Jakou的博客-CSDN博客_cmd 不显示窗口
CMD隐藏黑窗口运行_linuxbugs的博客-CSDN博客_cmd隐藏运行程序
安卓子系统安装命令¶
windows11恢复windows10版本右键菜单¶
直接显示更多选项
获取桌面路径¶
获取桌面的绝对路径
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v Desktop
@echo off
SET DESKTOP_REG_ENTRY="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
SET DESKTOP_REG_KEY="Desktop"
SET DESKTOP_DIR=
FOR /F "tokens=1,2*" %%a IN ('REG QUERY %DESKTOP_REG_ENTRY% /v %DESKTOP_REG_KEY% ^| FINDSTR "REG_SZ"') DO (
set DESKTOP_DIR="%%c"
)
ECHO Desktop dir: %DESKTOP_DIR%
PAUSE
bat不存在文件夹路径,则创建文件夹¶
bat获取输入信息¶
bat时间等待1秒钟¶
/nobreak表示忽视任意按键跳过等待
powershell下载命令¶
conda设置清华镜像¶
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/
powershell设置可以执行ps1脚本¶
以管理员形式运行powershell,并执行:
android设置dl.google.com¶
windows11安装wsa¶
1 在https://store.rg-adguard.net/里搜索www.microsoft.com/store/productid/9p3395vx91nr 选择Slow

2 下载MicrosoftCorporationII.WindowsSubsystemForAndroid_2203.40000.1.0_neutral_~_8wekyb3d8bbwe.msixbundle ,
若提示报错, 可以再按需下载
Microsoft.UI.Xaml.2.6_2.62112.3002.0_x64__8wekyb3d8bbwe.appx
Microsoft.VCLibs.140.00.UWPDesktop_14.0.30704.0_x64__8wekyb3d8bbwe.appx
3 以管理员打开powershell执行命令
Add-AppxPackage "E:\files\Downloads\MicrosoftCorporationII.WindowsSubsystemForAndroid_2203.40000.1.0_neutral___8wekyb3d8bbwe.Msixbundle"


4 adb
adb安装apk
node环境变量配置¶
npm config set cache "D:\software\node_14.17.3\node_cache"
npm config set prefix "D:\software\node_14.17.3\node_global"
vscode关闭受限模式¶
搜索security.workspace.trust, 勾选掉控制是否在vscode内启用工作区信任

powershell设置命令行颜色¶
function prompt {
Write-Host $env:USERNAME -ForegroundColor Green -NoNewline
Write-Host "@" -NoNewline
Write-Host $env:COMPUTERNAME -ForegroundColor Blue -NoNewline
Write-Host " $((Get-Date).toString('yyyy-MM-dd hh:mm:ss'))" -ForegroundColor DarkMagenta -NoNewline
Write-Host ":" -NoNewline
Write-Host $($executionContext.SessionState.Path.CurrentLocation) -ForegroundColor Blue -NoNewline
"$('>' * ($nestedPromptLevel + 1)) "
}

powershell设置¶
服务端配置¶

客户端配置¶
将服务端主机host添加到本地
cd WSMan::localhost\client
Get-ChildItem
Set-Item ./TrustedHosts 192.168.1.10
# 将所有hosts添加到本地
Set-Item ./TrustedHosts *
远程命令¶

自动化远程命令
windows管理方式 - 阳光-源泉 - 博客园 (cnblogs.com)
测试远程服务是否开启
Windows Terminal 完美配置 PowerShell 7.1 - 知乎 (zhihu.com)
poershell添加到右键菜单¶
pandoc以引文格式导出文件¶
代码块使用Source Code样式
CMD UI风格¶
一 PowerShell

屏幕背景
39 40 34
屏幕文字
黄色: 166 226 42
二 CMD

蓝色: 59 120 255

红色: 231 72 86