WindowsScheduledTask - GeneralElectric/TrueConnect-Link GitHub Wiki

Firstly you need to have set up user to execute TrueConnect-Link as.

Copy the below text, replacing "someTCuser" with the clientId you will be using to connect to TrueConnect, and then save to a new file called TrueConnectLink.xml

 <?xml version="1.0" encoding="UTF-16"?>
 <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
   <RegistrationInfo>
     <Date>2018-01-23T15:33:13.2270833</Date>
     <Author>GeneralElectric</Author>
     <URI>\TrueConnectLink</URI>
   </RegistrationInfo>
   <Triggers>
     <BootTrigger>
       <Enabled>true</Enabled>
     </BootTrigger>
   </Triggers>
   <Principals>    
   </Principals>
   <Settings>
     <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
     <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
     <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
     <AllowHardTerminate>true</AllowHardTerminate>
     <StartWhenAvailable>false</StartWhenAvailable>
     <RunOnlyIfNetworkAvailable>true</RunOnlyIfNetworkAvailable>
     <IdleSettings>
       <StopOnIdleEnd>true</StopOnIdleEnd>
       <RestartOnIdle>false</RestartOnIdle>
     </IdleSettings>
     <AllowStartOnDemand>true</AllowStartOnDemand>
     <Enabled>true</Enabled>
     <Hidden>false</Hidden>
     <RunOnlyIfIdle>false</RunOnlyIfIdle>
     <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
     <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
     <WakeToRun>false</WakeToRun>
     <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
     <Priority>7</Priority>
     <RestartOnFailure>
       <Interval>PT2H</Interval>
       <Count>300</Count>
     </RestartOnFailure>
   </Settings>
   <Actions Context="Author">
     <Exec>
       <Command>C:\ProgramData\TrueConnectLink\TrueConnectLink.exe</Command>
       <Arguments>-c:Auto -u:someTCuser</Arguments>
       <WorkingDirectory>C:\ProgramData\TrueConnectLink</WorkingDirectory>
     </Exec>
   </Actions>
 </Task>

In the directory you save this file run the following command replacing the username and password with ones you created to run TrueConnect-Link.

 schtasks /Create /U someuser /P changeme /XML TrueConnectLink.xml
⚠️ **GitHub.com Fallback** ⚠️