That's what the yes command is for. It outputs ys one per line indefinitely so it can be piped to commands that ask yes/no questions.
yes | /opt/MNG/MNGVIEWHP/fe/uninstall
That answers y to all questions. To answer n to all questions, replace yes with yes n. For a predefined mix of y and n, you can replace yes with:
printf '%s\n' y n n y y n...
Or run it as:
/opt/MNG/MNGVIEWHP/fe/uninstall << 'EOF'
y
n
n
y
y
n
EOF
If you do need the answer not to be available for reading before 10 seconds, you'd do:
(sleep 10; echo y; sleep 2; echo n;...) | /opt/MNG/MNGVIEWHP/fe/uninstall
But that would probably not be necessary, when we write y to the pipe, it's going to be there for uninstall to read it whenever it wants to read it, it's unlikely you'd need to wait for it to be ready to read it. The exception would be if uninstall decides to flush the input before asking the question.
All those assume the uninstall command just reads each answer as one line of input from its standard input.
For more complex cases, where the command reads the answers directly from the tty device or where you need to feed answers conditionally (for instance based on what the command outputs), that's where you'd use things like expect or zsh's zpty.
Note that many interactive programs can enter some non-interactive mode when passed some option. You may want to check their manual first, before spending too much effort working around the problem.
#! /bin/bash -instead of#!/usr/binuninstallprogram accepts parameters or a config script or not. It'll be easier that wayuninstalland wait for it to exit. Then sleep 10 seconds. Then echoy\nto stdout (which is still connected to the terminal, not to stdin of any program)