When you’re editing a Task Sequence and adding a Software Installation, you cannot select a Program.
Because a Task Sequence cannot handle user input, every program assigned to the sequence must be run in the background.
Go to Software Distribution / ‘Software name’ / Programs / ‘Program name’. Open the Properties of the program. Select Environment and uncheck the option ‘Allow users to interact with this program’.