0

I have looked through other questions in superuser and online and they all seem to suggest using Task Scheduler for what I want to do. Simply, I want to run my program at STARTUP or Boot with admin privileges. So far, I am not able to do it successfully. I have marked my exe file to run as administrator and have placed a link in the startup folder. It starts my program without admin privilege. Task scheduler seemed to be promising, but it is only starting my program as a background process and I can see my program listed under background process but my program main window doesn't load.

I followed what someone suggested using Task Scheduler as follows:

Create a Scheduled Task. Rather than triggering at a specific time, you trigger it at startup.

In the "Create Task" dialog, select the following:

General (tab) - "Run with highest privileges"
Triggers (tab) - New (button) - Begin the task - "At startup"

Note: Depending on the program "at log on" may be more applicable than "at startup."
8
  • Are you loading the main program with any parameters?
    – Dave
    Commented Jun 18, 2015 at 13:56
  • @Dave Nope... What parameters do I need to run my program as an application?
    – ThN
    Commented Jun 18, 2015 at 14:00
  • You don't, I just wanted to make sure you weren't.
    – Dave
    Commented Jun 18, 2015 at 14:03
  • the task scheduler trick only works for admin accounts. Looks like you use a standard user account Commented Jun 18, 2015 at 17:20
  • @magicandre1981 So, even though we have an account identified as administrator and with administrator privileges, it is not good enough....
    – ThN
    Commented Jun 18, 2015 at 17:37

1 Answer 1

0

Have a look at runas:

https://stackoverflow.com/questions/8249705/how-to-run-an-application-as-run-as-administrator-from-the-command-prompt

Make sure that the runas command has the /savecred switch. It'll ask you for credentials once and store them for future use.

Place a batch file with your command in your autostart folder.

1
  • 1
    I did do that and at startup it popups a cmd prompt for administrator's pass. When I enter it, it goes away but then I don't see my application running. I looked in the Task Manager and see that it did start but only as background process not as an application like before. We even tried it on some simple and small program thinking there may something wrong with my program to see if it acts the same and it does.
    – ThN
    Commented Jun 19, 2015 at 13:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .