G
G
Ghoo2019-09-08 20:38:03
cmd/bat
Ghoo, 2019-09-08 20:38:03

How to add a file to autoload regardless of how it is named?

There is a code in the batch file:
copy /y " program .exe" "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\"
program - program name.
But if the program is named differently, then alas, it does not work. How to make it so that, despite the name of the program, it is added to startup?
Or what needs to be done so that when you open the program, it is added to startup?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2019-09-08
@tsklab

On Windows, the name of the executable is the (full path) first (null) parameter.
@ECHO %0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question