home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
General
MP2-Edit - A MediaPortal 2 Media Library Editor
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Lehmden" data-source="post: 1126715" data-attributes="member: 109222"><p>Hi.</p><p>This is very strange as the MP2-Edit code definitely is adding quotes to the executable path. And as told before, the user to run MP2-Backup.exe from schedule is set to "System". I'm pretty sure this is not related to MP2-Edit as there is nothing I can find that can cause this.</p><p>Here's the code:</p><p>[code]$option = '/Create /RU SYSTEM /SC WEEKLY /D ' & $days & ' /TN MP2-Backup /TR "' & @ScriptDir & '\MP2-Backup.exe" /ST ' & GUICtrlRead($inputg1)[/code]</p><p>Strings are set between single quotes ( ' ) and the executable path is set between double quotes ( " ) to have the quotes available in the string itself. With & strings are added together and $days is a variable that holds the days of the week to run the schedule, like the user has set it. @ScriptDir is the install- folder of MP2-Edit (and MP2-Backup) and with GUICtrlRead($inputg1) the given time to run the schedule is read from GUI.</p><p></p><p>/Create is the option to create a new task. /RU is the user-account the new task should run at, /SC is the type of schedule (Weekly in this case), /D sets the Day(s) when the task should run (you can add one or more days here), /TN is the name to use for this task, /TR is the executable to run (MP2-Backup.exe) and /ST is the starting time for the task... So $option is holding the complete parameters for schtasks.exe</p><p></p><p>And before the new schedule is created there is a /Delete run triggered to remove previous tasks with the same name.</p><p></p><p>Here the schedule is working exactly as expected. The backup is running every day from task scheduler and keeps an eye on the number of backups to keep like adjusted in settings.</p></blockquote><p></p>
[QUOTE="Lehmden, post: 1126715, member: 109222"] Hi. This is very strange as the MP2-Edit code definitely is adding quotes to the executable path. And as told before, the user to run MP2-Backup.exe from schedule is set to "System". I'm pretty sure this is not related to MP2-Edit as there is nothing I can find that can cause this. Here's the code: [code]$option = '/Create /RU SYSTEM /SC WEEKLY /D ' & $days & ' /TN MP2-Backup /TR "' & @ScriptDir & '\MP2-Backup.exe" /ST ' & GUICtrlRead($inputg1)[/code] Strings are set between single quotes ( ' ) and the executable path is set between double quotes ( " ) to have the quotes available in the string itself. With & strings are added together and $days is a variable that holds the days of the week to run the schedule, like the user has set it. @ScriptDir is the install- folder of MP2-Edit (and MP2-Backup) and with GUICtrlRead($inputg1) the given time to run the schedule is read from GUI. /Create is the option to create a new task. /RU is the user-account the new task should run at, /SC is the type of schedule (Weekly in this case), /D sets the Day(s) when the task should run (you can add one or more days here), /TN is the name to use for this task, /TR is the executable to run (MP2-Backup.exe) and /ST is the starting time for the task... So $option is holding the complete parameters for schtasks.exe And before the new schedule is created there is a /Delete run triggered to remove previous tasks with the same name. Here the schedule is working exactly as expected. The backup is running every day from task scheduler and keeps an eye on the number of backups to keep like adjusted in settings. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
General
MP2-Edit - A MediaPortal 2 Media Library Editor
Contact us
RSS
Top
Bottom