I am trying to run a batch file with these contents: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?Code:ECHO OFF TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /internal TIMEOUT /T 2 /NOBREAK DisplaySwitch.exe /external
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.
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.
I think you need the Pro version of Win10 for GPEDIT. Your System Specs don't reflect whether you have Home or Pro.
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
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.