Create a Startup Script in Windows 10

I'd like to add a shortcut on my desktop that I can just double click to be able to launch "shell:startup" as per the suggestion in this Microsoft Article which says in part;

To add or remove an app from the Startup tab, press the Windows Logo Key  + R, type shell:startup, and then select OK. This opens the Startup folder.

I've tried creating a batch file to do the above, but it doesn't work for me... I just notice a DOS windows pop up for a second and then it disappears.

Can anyone show me how I can create an icon to be able to do this?

My system is a Windows 10 Professional install.

Many thanks...

Andrew
LVL 23
Andrew LeniartFreelance JournalistAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Omar SoudaniSenior System EngineerCommented:
Hello,

check the attached file, rename it to .bat and try.
startup.txt
0
McKnifeCommented:
Hi.

It resolves to %appdata%\Microsoft\Windows\Start Menu\Programs\Startup and that is where you can create a shortcut to.
0
Andrew LeniartFreelance JournalistAuthor Commented:
Thanks, guys, but there's a problem.

If I use Omars idea, I get this result:

Omar's Suggestion
If I create a shortcut as per McKnife's idea, I get this result:

McKnife's Suggestion
Yet, if I do a search on my C: drive for My AutoHotkey Script.exe I get the following result in Windows File Explorer

Search C Drive for My AutoHotkey Script.exe
Then, if I right click on the second result and select "Open File Location" I get this result, which is what I want...

Open File Location
What's going on here??  

The reason I want to have this shortcut on my desktop is that I frequently update my AuthHoyKey Script and then compile it into an EXE. I want a quick way to be able to replace the "My AutoHotkey Script.exe" whenever I've updated and recompiled it.

Why does it show up when I use the Open File Location but doesn't show up with the two shortcut methods that have been suggested?

Hope can I create this shortcut so that it opens as per the last example, so I can just delete the My AutoHotkey Script.exe and replace it with the updated recompiled My AutoHotkey Script.exe ?

Hope that makes sense? I don't understand how to create a shortcut on my desktop that will open up the Startup folder where My AutoHotkey Script.exe shows up.

Any ideas?
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

McKnifeCommented:
Andrew, your shell: startup goes to the personal startup.
The location you want is: shell:common startup
which translates to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp (which you can let a shortcut point to).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andrew LeniartFreelance JournalistAuthor Commented:
Thanks very much McKnife. That was driving me crazy! Creating the shortcut as you suggested to the path in your last comment works just as I wanted. Very much appreciate your help!

Andrew
0
Omar SoudaniSenior System EngineerCommented:
I believe the shell:startup will open the startup folder under "users" in your case it's different. Just copy the path to the text file. check attached
startup.txt
0
Andrew LeniartFreelance JournalistAuthor Commented:
Thanks, Omar, but McKnife's solution worked great and saved me writing a script too. I do appreciate your help as well though, so thank you.
0
Omar SoudaniSenior System EngineerCommented:
You're Welcome! Glad your problem is solved.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.