That kind of notice is usually controlled by group policy and stored in the registry. I believe I used to have a pair of tasks for modifying the registry directly to disable and re-enable one so that I could run tasks in a foreground session. I don't have those tasks anymore because I no longer have things that need to run in the foreground, but that might give you a starting point.