Hi,
I'm trying to create a program with a dependent program and that dependent program should always run. I have no issues to set the dependent program but I can not manage to set the "Always run the dependent program" checkbox.
I've tried using the RUN_DEPENDANT_ALWAYS as according to the SDK but the checkbox was never marked.
I ended up extracting the program option value from another program that I've created and that worked, at least in the GUI the dependent program was correct and the checboxk was checked. The problem is that when I run the program, its dependent program does not run unless I go into the program properties and redo the dependent program in the GUI and save the changes.
This leads me to believe that there is something that my code does not set right which makes it appear ok in the GUI but not when executed.
I'm running this piece of code against ConfigMgr 2007 SP1 and I utilize the newest version of the SDK and the code is written in C#.
Code that does not set the checkbox:
newProgram["ProgramFlags"].IntegerValue =(int)ProgramFlags.AdminRights + (int)ProgramFlags.UserContext + (int)ProgramFlags.UseUncPath + (int)ProgramFlags.RunDependantAlways;
Code that does set the checkbox but does not work when executing the program (integer value is extracted with WQL from a program that is configured excatly as I want it and that works):
newProgram["ProgramFlags"].IntegerValue = 1097856;
Anyone experience any issues with the RUN_DEPENDANT_ALWAYS? Anyone that could provide me with an example of the correct and working way to code this?