xud6

xud6

windows

Office2024 KMS激活提示非正版软件警告

在64位windows上安装32位Office的时候需要在WOW6432Node添加KeyManagementServiceName注册表项 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "" reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f /v KeyManagementServiceName /t REG_SZ /d "" /reg:32 参考 https://massgrave.dev/office-license-is-not-genuine
linux

Ubuntu 20.04 lightdm 关闭休眠

禁用systemd休眠状态 sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target 修改lightdm的Time before suspend sudo -u lightdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 sudo -u lightdm dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0 sudo -u lightdm dbus-launch gsettings set org.gnome.settings-daemon.
1 min read
打印机

Windows 预安装打印机驱动

将打印机驱动复制到可以访问的共享路径 使用以下powershell脚本安装驱动 pnputil.exe /a "\\\koaxpj__.inf.inf" 之后确认安装后打印机驱动的路径,在C:\Windows\System32\DriverStore\FileRepository下 打开inf文件记录下实际打印机型号的名称,如 [KONICA MINOLTA.NTamd64] "KONICA MINOLTA C368SeriesPCL" "KONICA MINOLTA C3851SeriesPCL" 使用以下powershell脚本添加具体驱动 Add-PrinterDriver -Name "KONICA MINOLTA C368SeriesPCL" -InfPath "C:\Windows\System32\DriverStore\FileRepository\koaxpj__.inf_amd64_c4e736b89265dcc3\koaxpj__.inf" Add-PrinterDriver -Name "KONICA MINO
1 min read
mac

MACOS 修复应用修改后代码签名问题,即xxx.app已损坏

创建代码签名证书 打开钥匙串访问 打开菜单栏-钥匙串访问-证书助理创建证书 证书类型选代码签名,名称取个终端中容易输入的,创建。 找到刚创建的证书,打开后在信任中代码签名修改为始终信任。 重签名有问题的app sudo codesign --deep --force --verify --verbose --sign "XXXXXcodesign" /Applications/YYYYY.app XXXXXcodesign为刚才创建的证书名 YYYYY.app为需要签名的app
windows

Powershell 卸载程序

function Uninstall-Application { $appName = $($args[0]) Write "application to uninstall: $appName" $uninstall32 = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -Match $appName } $uninstall64 = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match $appName } if($uninstall32){ if($uninstall32.QuietUninstallString){ Write ("uninstall32 Quiet