Windows 10: Unable to run batch file at startup

Discus and support Unable to run batch file at startup in Windows 10 Support to solve the problem; I am trying to run a batch file with these contents: Code: ECHO OFF TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /internal TIMEOUT /T 2 /NOBREAK... Discussion in 'Windows 10 Support' started by robo731, Jan 16, 2016.

  1. robo731 Win User

    Unable to run batch file at startup


    I am trying to run a batch file with these contents:
    Code: ECHO OFF TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /internal TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /external[/quote] I've tried putting a shortcut to it in the startup folder, putting the bat itself in the startup folder, and running it as a task using task scheduler. I also have UAC completely disabled. It runs fine when I run it myself, but it won't run at startup. How can I get to run when I start the computer?

    :)
     
    robo731, Jan 16, 2016
    #1
  2. : z : Win User

    Preload a folder into memory in the background at startup?

    Could a batch file be used to open D:\Music and then scan all subdirectories of that folder for Folder.ico? I'm guessing that once the batch file has read those files, they will then be in memory, correct? I can put the batch file in my Windows startup
    folder to automatically run at startup.
     
    : z :, Jan 16, 2016
    #2
  3. Dan_654 Win User
    WIndows 10 Upgrade, computer thinks it has two monitors, only has one. Intel G45/G43, on dell all-in-one

    I did a workaround. I created a batch file that runs at startup that automatically changes the display to duplicate.

    Only issue I had was batch file would only run at login. So I changed another setting so it would automatically log me in when computer was started.
     
    Dan_654, Jan 16, 2016
    #3
  4. Unable to run batch file at startup

    Tried using Group Policy to run it? I have a little batch file that I use to delete logs running at shutdown, used GP to do it.
     
    wreckwriter, Jan 16, 2016
    #4
  5. robo731 Win User
    I wasn't familiar with group policy. I looked into it though, but I don't think I have it on my system. I though of something though. The purpose of my script is to change the primary display from the laptop screen to the external monitor. Is it possible that the script is running too early at startup?
     
    robo731, Jan 17, 2016
    #5
  6. Perhaps. Why do you need a script for that? I have several laptops running external monitors, everything is automatic.
     
    wreckwriter, Jan 17, 2016
    #6
  7. Berton Win User
    I think you need the Pro version of Win10 for GPEDIT. Your System Specs don't reflect whether you have Home or Pro.
     
    Berton, Jan 17, 2016
    #7
  8. robo731 Win User

    Unable to run batch file at startup

    I use the laptop exclusively for video playback to a TV. When you turn the laptop on with the HDMI plugged in, the built in display is on, but blank. The only way to get the built in display to actually turn off is to set the primary to the built in display, then to the external.

    Yeah, I know. I meant that my system is running home, so it doesn't have it.
     
    robo731, Jan 17, 2016
    #8
  9. This page shows a few ways to insert delays in batch files, might help...

    How to insert delays in your batch files
     
    wreckwriter, Jan 17, 2016
    #9
  10. robo731 Win User
    I guess the delay was the issue. Instead of changing it in the batch file though, I just changed it in task scheduler. Instead of having it run at startup, I set it to run at logon of any user.
     
    robo731, Apr 4, 2018
    #10
Thema:

Unable to run batch file at startup

Loading...
  1. Unable to run batch file at startup - Similar Threads - Unable run batch

  2. Cant run Batch file

    in Windows 10 Gaming
    Cant run Batch file: When i try to run a batch file all it says is this app can't run on your pc i tried going to my property and going to compatibility but it isn't there im on windows 11 btw but if someone can pls help...
  3. Cant run Batch file

    in Windows 10 Software and Apps
    Cant run Batch file: When i try to run a batch file all it says is this app can't run on your pc i tried going to my property and going to compatibility but it isn't there im on windows 11 btw but if someone can pls help...
  4. Batch File run but GUI not prompt

    in Windows 10 Gaming
    Batch File run but GUI not prompt: Hello,I made an batch file to run exe file but GUI prompt not appear if i tried to run from outside i.e. batch file present on ABC Folder and I am going to command prompt and run the same it's running and GUI Interface shows but when I runneed the file from other directory...
  5. Batch File run but GUI not prompt

    in Windows 10 Software and Apps
    Batch File run but GUI not prompt: Hello,I made an batch file to run exe file but GUI prompt not appear if i tried to run from outside i.e. batch file present on ABC Folder and I am going to command prompt and run the same it's running and GUI Interface shows but when I runneed the file from other directory...
  6. run batch file step by step

    in Windows 10 Customization
    run batch file step by step: Hi to all I need your help and support, I'm a Test Engineer and I dedicate and maintain to develop and improve batch files, and I need to know if somebody knows, how to run a batch file step by step in windows 10 or windows server?. Previously in ms-dos i use the next line...
  7. Running PowerShell script as a batch file

    in Windows 10 Network and Sharing
    Running PowerShell script as a batch file: Can I run the Power Shell line: "C:\Windows\System32>get-appxpackage *3dbuilder* | remove-appxpackage" from a .Bat file? ***Original title: Removing bloatware***...
  8. Run oscdimg.exe from a batch file?

    in Windows 10 Installation and Upgrade
    Run oscdimg.exe from a batch file?: OK, I have a batch file that copies files from a mounted windows 10 installation file and updates drivers in boot.wim and install.wim. The thing I cannot work out is how to automatically run oscdimg.exe (command from deployment and imaging environment) in a batch file so I...
  9. Running an uneditable Batch file

    in AntiVirus, Firewalls and System Security
    Running an uneditable Batch file: Hi people, Got a task to run a certain CMD command on a number of PCs as administrator. So I thought i would create a batch file doing this. This is not the issue. The issue is that I am unable to lock down successfully so people cannot just edit the file to see the admin...
  10. Startup batch file

    in Windows 10 Support
    Startup batch file: When Windows 10 starts, a DOS window appears, runs: C:\Users\Brian\AppData\Local\854e8f7.bat , then disappears. The .bat file contains: start "plqcknRlU67iM4TfEXQq" "%LOCALAPPDATA%\b183312\88d4f24.21b2bbd3" There are two files in C:\Users\Brian\AppData\Local\...