I
I
Ilya2021-09-30 20:02:45
cmd/bat
Ilya, 2021-09-30 20:02:45

Add task to auto start?

Good afternoon, I have a program - C:\Users\PC\Desktop\foo.exe .
It needs to be added to autorun with administrator rights using cmd. How could I do this? (If possible, leave the command in the answer)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2021-10-01
@stead

You can add jobs to the scheduler using the schtasks utility.
Using reg add - you can add keys to the registry for autorun.
But if you need administrator rights when running the program, then in both cases, when calling schtasks and reg, you must have these rights.

E
ettaluni, 2021-09-30
@ettaluni

Throw a label on your script in the folder %userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
But it seems like it will always ask for rights until you disable uac

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question