2

I am basically scheduling a task in task scheduler through xml file. My question is how we give relative path to the exe which is scheduled as a task in task scheduler. Screenshot of my xml file

how can we give relative path to xml under <command>. because i want to run this on other systems as well.

ceving
  • 21,900
  • 13
  • 104
  • 178
Slazenger
  • 43
  • 5
  • 1
    Do not convert text into pixels. – ceving Jan 05 '22 at 10:42
  • You can define a working directory: https://learn.microsoft.com/en-us/windows/win32/taskschd/taskschedulerschema-exectype-complextype – ceving Jan 05 '22 at 10:48
  • @ceving I am not understanding kindly can you explain your answer? – Slazenger Jan 06 '22 at 04:44
  • My issue is that I don't want to give absolute path in the highlighted area I need a dynamic path. xml file pick this exe file on runtime. – Slazenger Jan 06 '22 at 04:58
  • I am sending this exe `sectel.exe` with my app and also this xml file i just want that this xml file picked it from client's machine and run it as scheduled task. Let's suppose this exe file is storing in appdata folder so how i update my xml file that it automatically picked it up and execute it? – Slazenger Jan 06 '22 at 06:34
  • The scheduler looks either in the specified working directory, in the absolute path or in the system PATH. Your installation needs to make sure, that one of the three matches. – ceving Jan 06 '22 at 08:18

0 Answers0