23 lines
626 B
PowerShell
23 lines
626 B
PowerShell
$ErrorActionPreference = "Stop"
|
|
|
|
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
$runScript = Join-Path $scriptDir "run.ps1"
|
|
$launchAsrScript = Join-Path $scriptDir "launch-asr.ps1"
|
|
$bridgeScript = Join-Path $scriptDir "bridge-cloud.ps1"
|
|
|
|
$tasks = @(
|
|
@{
|
|
Name = "StoryForgeWindowsAsr"
|
|
Script = $launchAsrScript
|
|
},
|
|
@{
|
|
Name = "StoryForgeWindowsAsrCloudBridge"
|
|
Script = $bridgeScript
|
|
}
|
|
)
|
|
|
|
foreach ($task in $tasks) {
|
|
schtasks /Create /F /SC ONLOGON /RL HIGHEST /TN $task.Name /TR "powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"$($task.Script)`""
|
|
schtasks /Run /TN $task.Name
|
|
}
|