Winuser.h 标头 - Win32 apps | Microsoft Learn

[toc]

winuser 相关函数说明

GetSystemMetrics

GetSystemMetrics 函数 (winuser.h) - Win32 apps | Microsoft Learn 检索指定的系统指标或系统配置设置。 请注意, GetSystemMetrics 检索的所有维度都以像素为单位。

int iconWidth = GetSystemMetrics(SM_CXSMICON);  // 图标基准宽度 
int iconHeight = GetSystemMetrics(SM_CYSMICON); // 图标基准高度

NetUser

启用管理员用户并修改密码

net user administrator /active:yes
net user administrator 123456
 
# powershell 修改防火墙策略
powershell.exe "Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False"