/*
Let's say you want to create a launcher that, with the click of a button, opens all of the programs you use on a daily basis. Let's also say that your system administrator has blocked certain apps from running unless they are run with Administrative permission. And, finally, let's say that some of your programs (Like Outlook) don't function properly when they, too, are run with administrative permission
*/
/*
To handle this, create Scheduled Tasks using the Windows Task Scheduler. Don't add any triggers to your tasks, but point them to the program you want to launch. If they need administrative permission to run, check the "Run with highest permission" checkbox. If they don't, leave it unchecked
*/
/*
Run your tasks as follows:
(In the examples below, my tasks are stored in a custom folder in the Task Scheduler named "Doug's Custom Tasks")
*/
var Args = new string[] {
"/run /tn \"\\Doug's Custom Tasks\\Run PortableApps as Administrator\""
};
StartupPrograms.Add(new StartupProgram
{
AppPath = @"C:\Windows\System32\Schtasks.exe",
AppName = "Task Scheduler",
Args = Args
});
Args = new string[]
{
"/run /tn \"\\Doug's Custom Tasks\\Run Outlook As Standard User\""
};
StartupPrograms.Add(new StartupProgram
{
AppPath = @"C:\Windows\System32\Schtasks.exe",
AppName = "Task Scheduler",
Args = Args
});
/*
For programs that don't matter how they run, you can call them individually
*/
StartupPrograms.Add(new StartupProgram
{
AppPath = @"C:\Users\dlockwood\AppData\Local\Apps\2.0\H34GAGRH.PJ8\NXANYN8W.LQA\81e2..5a40_0000000000000000_000b.0004_d0f5373a6993ab3a\TechnicianClient.exe",
AppName = "BMC Track-It"
});