/build/static/layout/Breadcrumb_cap_w.png

I need to force the TASK scheduler to run with VERSION -2 in the argument - It disappears after few runs

I have a script 1 which creates a task - Task runs the script 2 - 1 and 2 are PS1
Script 1 creates the task which runs Script 2
I need to add an argument to the task via the script 1 -Version 2 which works for few runs and then disappears.

Regards,
Shree

0 Comments   [ + ] Show comments

Answers (1)

Posted by: JasonEgg 6 years ago
Red Belt
0
I would suggest making "script 1 version 2" set/change a registry entry to indicate how many times the script has ran on the computer. I admit this would be impractical if the job needs to run ten times, but would be fairly straightforward if the script only has to run three times or less. There is no option to say "increment reg value" so you'd have to use "verify a registry value is" with remediation/success logic to set the correct number.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ