I want run this bat file from task scheduler
@Rem %pf% expands to the right program location depending if it is x86 or x64 system
@setlocal
@set pf=%ProgramFiles%
@if not "[%ProgramFiles(x86)%]"=="[]" set pf=%ProgramFiles(x86)%
@Rem %macropath% expands to the demo macros path
@set macropath=%~dp0....MacrosDemo
"%pf%IpswitchiMacrosiMacros.exe" -macro "D:UsersWDocumentsiMacrosMacrosWN.iim"
I have 2 problems that I need help with.
1) If I run the batch file it works but closes the program when it's done. I need it to leave the program iMacros running.
2) If I try to automate the time it runs with task scheduler if gives the error 0x1
Other errors I've received trying different options are The requested operation requires elevation or The operator or administrator has refused the request, (0x800710E0)
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2015-12-20T21:11:42.0831839</Date>
<Author>W-PCW</Author>
<URI>iMacro Watch Now</URI>
</RegistrationInfo>
<Triggers>
<TimeTrigger>
<StartBoundary>2016-01-17T10:40:00</StartBoundary>
<Enabled>true</Enabled>
</TimeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-138512411-977147251-668013927-1004</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>HighestAvailable</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</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>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>"D:UsersWDocumentsiMacrosiMacros2 .bat"</Command>
<WorkingDirectory>D:UsersWDocumentsiMacros</WorkingDirectory>
</Exec>
</Actions>
</Task>