开机自动启动高铁采集器
高铁采集器win10全兼容版下载地址:
http://q315344306.oicp.net:9800/highferrum_9.8.0.0_full_function_win10.zip
Z:\Locoy\StartLocoy.ps1
function Send-Keystrokes ([string] $Keys, [string] $Title, [int] $Delay = 1) {
try {
$wshell = New-Object -ComObject WScript.Shell
IF ($Title) {
$wshell.AppActivate($Title)
}
Start-Sleep -Seconds $Delay
$wshell.SendKeys($Keys)
Start-Sleep -Seconds 1
}
finally {
try {
[System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$wshell) | Out-Null
[System.GC]::Collect()
[System.GC]::WaitForPendingFinalizers()
}
catch { }
}
}
$Title = "高铁采集器"
$WorkingDirectory = "Z:\Locoy"
$FilePath = "Z:\Locoy\高铁采集器9.8全功能版(账号密码随意输入).exe"
Start-process -FilePath $FilePath -WorkingDirectory $WorkingDirectory | Out-Null
Send-Keystrokes -Keys "username" -Title $Title -Delay 5
Send-Keystrokes -Keys "{TAB}"
Send-Keystrokes -Keys "password"
Send-Keystrokes -Keys "{TAB}"
Send-Keystrokes -Keys "{TAB}"
Send-Keystrokes -Keys " "
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Z:\Locoy\StartLocoy.ps1
右键【开始】,选择【计算机管理】,创建基本任务