none
Copy Batch (.bat) file to startup Menu of All User/Each User RRS feed

  • Question

  • I have created a batch file(file1.bat) to run on every machine to create a batch file(file2.bat) to a launch a page at windows startup.

    This is the content of file1.bat:

    @echo off

    @echo>"C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat
    @echo start http://www.msn.com/> C:\Users\User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat

    Expected result is to copy the file2.bat to startup of each user profile.  The file2.bat is not copied to the startup folder on windows 7, 8, 10.

    However, this will work on file1.bat:

    @echo off

    @echo>"C:\Testing\file2.bat
    @echo start http://www.msn.com/> C:\Testing\file2.bat

    I do not have a domain joined network.  I need to send the file1.bat to all staff.  I plan to deploy to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup. 

    Thanks in advance to all.  Any help is appreciated. 

    Monday, September 12, 2016 6:03 AM

All replies

  • Hello,

    use this path for startup menu:

    "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup" (include quotes)

    Please, let us know.

    Monday, September 12, 2016 9:32 AM
  • Hi all, thanks for your response.  This is working("%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup").

    Can you help me to look at this?  I am trying to copy the same batch file(file1.bat) to all users startup. 

    This is the content of file1.bat:

    @echo off

    @echo>"%programdata%\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat"
    @echo start http://www.msn.com/> "%programdata%\Microsoft\Windows\Start Menu\Programs\Startup\file2.bat

    Expected result is to copy the file2.bat to startup of all user profile.  However, The file2.bat is not copied to the startup folder on windows 7, 8, 10 after testing.  Very likely, the access is denied.  However, I am using a local admin account and File2.bat is not copied to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\.

    What to add into the script(in file1.bat) to run as an admin?  Any other suggestion to resolve this?  File2.bat is to launch a web page when machine startup

    Please guide me.  Thank you.




    • Edited by YZenh Tuesday, September 13, 2016 5:07 AM
    Tuesday, September 13, 2016 4:46 AM
  • Hello,

    you can try with Windows built-in TASK SCHEDULER.

    use this how to (credits to the author): http://www.sevenforums.com/tutorials/67503-task-create-run-program-startup-log.html

    Let us know.

    Tuesday, September 13, 2016 9:10 AM
  • Hi,

    We haven’t heard from you for a couple of days, have you solved the problem? How about the solution we have provided? We are looking forward to your good news.

    Best Regards,

    Tao


    Please remember to mark the replies as an answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, September 20, 2016 8:31 AM
    Moderator