Windows 10: Unable to run batch file at startup Solved

  1.    17 Jan 2016 #1

    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
    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?
      My ComputerSystem Spec

  2.    17 Jan 2016 #2

    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.
      My ComputerSystem Spec

  3.    17 Jan 2016 #3

    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?
      My ComputerSystem Spec

  4.    17 Jan 2016 #4

    robo731 said: View Post
    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?
    Perhaps. Why do you need a script for that? I have several laptops running external monitors, everything is automatic.
      My ComputerSystem Spec


  5. Posts : 3,232
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint
       17 Jan 2016 #5

    robo731 said: View Post
    I wasn't familiar with group policy. I looked into it though, but I don't think I have it on my system.
    I think you need the Pro version of Win10 for GPEDIT. Your System Specs don't reflect whether you have Home or Pro.
      My ComputerSystem Spec

  6.    17 Jan 2016 #6

    wreckwriter said: View Post
    Perhaps. Why do you need a script for that? I have several laptops running external monitors, everything is automatic.
    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.

    Berton said: View Post
    I think you need the Pro version of Win10 for GPEDIT. Your System Specs don't reflect whether you have Home or Pro.
    Yeah, I know. I meant that my system is running home, so it doesn't have it.
      My ComputerSystem Spec

  7.    17 Jan 2016 #7

    robo731 said: View Post
    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.
    This page shows a few ways to insert delays in batch files, might help...

    How to insert delays in your batch files
      My ComputerSystem Spec

  8.    17 Jan 2016 #8

    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.
      My ComputerSystem Spec


 

Related Threads
Solved Writhing Batch File in General Support
Here is my batch file but it will not delete the file? Must be missing something :( del "C:\Users\Larry\AppData\Local\TractorParts\tractor\ConfigSetting" Trying to delete the ConfigSetting File
Chaps... I have a desktop running with a few apps 24/7 feeding to a network, on the rare occasion it drops or restarts due to some update or power outage I thought I could write a simple batchfile just to restart everything automatically. ...
Start a program from a batch file in Software and Apps
I'm trying to create a batch file that should - call another batch file - start a program and then wait for the program to close - call another batch file My goal with this is to work around an issue in Windows 10 where the screensaver won't...
I've been trying to figure this out for a while now and I can't. I've looked at tons of small tips online to get this working but it doesn't work at all. I have a batch file which causes various programs to start when opened. However, one of them...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 22:04.
Find Us