openvpn-2fa-autoconnect/vpn_tray_task.xml
boyko_vn 092a78a2a4 feat: автозапуск трея через Планировщик заданий
launch_vpn.bat — запуск без окна консоли (pythonw из .venv, PATH или pyw -3).
vpn_tray_task.xml — задача с наивысшими правами, чтобы ensure_admin() не дёргал
UAC при каждом входе в систему.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 01:24:38 +03:00

48 lines
3.3 KiB
XML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Description>VPN TOTP tray: launch_vpn.bat at logon, elevated, no UAC prompt</Description>
<URI>\VPN-TOTP-Tray</URI>
</RegistrationInfo>
<Triggers>
<LogonTrigger>
<Enabled>true</Enabled>
<UserId>ANO-DA-46E73B\boyko_vn</UserId>
<Delay>PT15S</Delay>
</LogonTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>ANO-DA-46E73B\boyko_vn</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>false</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>true</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\Windows\System32\cmd.exe</Command>
<Arguments>/c "C:\Users\User\develop\my\vpn\launch_vpn.bat"</Arguments>
<WorkingDirectory>C:\Users\User\develop\my\vpn</WorkingDirectory>
</Exec>
</Actions>
</Task>