An example of creating and running an elevated scheduled task. This program launches Notepad.exe with Admin permissions, and passes the command line parameters.
The first time you run this program, you will see a UAC prompt. Any subsequent time you run it, you will not, but the program will run with Admin permissions.