Search code examples
windowsbatch-filecmdstartupwmic

Remove programs from Windows startup with a .bat file


I am trying to create a .bat file that removes applications from Startup in Windows 10. What I am trying to achieve is that after the .bat file has been executed these apps are removed and won't start automatically the next time Windows boots. I have also integrated other functions in this file, but this is the only one that I am having trouble with. I am aware that this can be done in msconfig. I just need the .bat file to do it.

Can I use wmic? Or maybe I should just remove the programs from C:\Users(User-Name)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

I am sorry if there are other similar topics and if you think that my question matches exactly, please link those threads.

Thank you in advance.


Solution

  • Try something like

    @echo off
    del C:\Users\%username%\AppData\Roaming\Microsoft\Windows\StartMenu\Programs\Startup\<filename>
    pause
    

    would be the File you want to delete. You can put the second line so often as you want with different names. You can also skip the pause.

    If it is not working try to run as Administrator

    You can use %username% as username. So the Script is relative to the Username. I don't have a Windows machine here. If you want to I can write a better example after work is done ;)