Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

New Post: ExecAction.Path property isn't stripping off quotes when retrieved

$
0
0
Then basically you're telling me that I'm just going to have to include my own code to sanitize the output of the Path property when retrieving the path of the ExecAction. I need to do this since every run time of the program has a function that checks to see if the task's ExecAction path is valid in the sense that the file exists which involves sending the path property through IO.File.Exists() function. Without a sanitized path, that is, one without quotes, the IO.File.Exists() function returns an incorrect returned value.

I was hoping that you would include it since you have far more knowledge of how a path passed from the Windows Task Scheduler than I do and how it could get mangled in the process.

Yes, I understand that when creating your task you should take care when setting things up for your task but what if someone decides to mangle the task that your program depends upon? They could change the path of the ExecAction thus making your task invalid. The purpose of the code that I have in my program is to make sure that that doesn't happen and if it does detect that the task has been mangled by the user, it deletes the task and re-creates it.

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>