Home:ALL Converter>Task Scheduler Runs Batch File - Batch File Only Works Partially?

Task Scheduler Runs Batch File - Batch File Only Works Partially?

Ask Time:2018-11-02T03:13:08         Author:ScriptNoob

Json Formatter

My batch file is very simple. It starts a program, and echos "I ran" into a .txt file to prove that it ran for testing purposes. The settings for my Task Scheduler task are below:

General: 
- Run whether user is logged in or not.
- Run with highest privileges
- Configure for Windows 7, Windows Server 2008 R2

Trigger: 
-At startup, 15 min delay

Action:
- Start a Program
- Program/Script: STARTRDM.BAT
- Add arguments (optional): blank
- Start in (optional): C:\Scripts\

Conditions: None

Settings: 
- Allow task to be run on demand
- Stop the task if it runs longer than 1 hour
- If the running task does not end when requested, force it to stop
- If the task is already running, , do not start a new instance.

STARTRDM.BAT
>>log.txt echo I RAN
start C:\"Program Files (x86)"\Devolutions\"Remote Desktop Manager"\RemoteDesktopManager64.exe`

If I double click the batch file, it starts the program as expected and also writes to the .txt file. If I run the batch file through the Task Scheduler, the .txt is appended to as expected but the program is not started. This is driving me crazy!

Author:ScriptNoob,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53107890/task-scheduler-runs-batch-file-batch-file-only-works-partially
yy