12 lines
668 B
PowerShell
12 lines
668 B
PowerShell
# 以管理员权限运行密钥提取脚本, 输出重定向到文件
|
|
$scriptDir = "C:\Users\pc\WorkBuddy\2026-08-19-18-27-34"
|
|
$pythonExe = "C:\Users\pc\.workbuddy\binaries\python\envs\default\Scripts\python.exe"
|
|
$script = "$scriptDir\wxwork_find_key.py"
|
|
$outFile = "$scriptDir\key_extract_output.txt"
|
|
$errFile = "$scriptDir\key_extract_error.txt"
|
|
|
|
$process = Start-Process -FilePath $pythonExe -ArgumentList $script -WorkingDirectory $scriptDir -Verb RunAs -Wait -PassThru -RedirectStandardOutput $outFile -RedirectStandardError $errFile
|
|
Write-Output "Exit code: $($process.ExitCode)"
|
|
Write-Output "Output saved to: $outFile"
|
|
Write-Output "Error saved to: $errFile"
|