Hello,
Looking for a Windows 7 batch script to do the following, same time, daily:
If HP-7700 PC is powered off then power on
Start Firefox
C:\Program Files\Mozilla Firefox\firefox.exe
Start 1x1.exe (directory player)
C:\program files\1by1\1by1.exe
Windows 7 Ultimate SP1
user: C:\users\admin
Thanks in advance!
bat to power on + start programs Win7 Ultimate
Moderator: DosItHelp
Re: bat to power on + start programs Win7 Ultimate
Pretty sure a batch file cannot run unless the computer is on.
-
- Posts: 118
- Joined: 02 Apr 2017 06:11
Re: bat to power on + start programs Win7 Ultimate
batnoob wrote:Pretty sure a batch file cannot run unless the computer is on.
That's obvious. That's why no one hasn't even bothered to reply to this stupid post
-
- Posts: 128
- Joined: 23 May 2016 15:39
- Location: Spain
Re: bat to power on + start programs Win7 Ultimate
but, what if hp-7700 is another computer? it may be powered on with a WOL packet (it network card is set to allow it) that can be sent by powershell command. then, running any exe can be done through WMI, all this in a batch script. Anyway, the OP must do some homework/research.
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: bat to power on + start programs Win7 Ultimate
PaperTronics wrote:batnoob wrote:Pretty sure a batch file cannot run unless the computer is on.
That's obvious. That's why no one hasn't even bothered to reply to this stupid post
Don't be a dick, the rest of the post is perfectly feasible.
Re: bat to power on + start programs Win7 Ultimate
OK ... Well. I guess this is some kind of kiosk PC or just drives a screen display?
The first request is impossible by batch file. But you have three options.
1. Some BIOSes support setting a timed power-on. If you're lucky, you can set that there. Alternatively, if no such option exists, set it it to turn on automatically when the power goes on, and put a timer on the plug. Schedule it to automatically shut itself down with a Scheduled Task before the timer yanks the power
2. If the machine runs continually, and you just want to restart it every day ... Task Scheduler. Set a scheduled task to restart.
3. If you have another computer on the same LAN that runs continually, WOL.EXE and a scheduled task to turn it on.
As for the rest of your request ... we have about 14 servers worldwide whose 'services', for ease of debugging, ran as console windows in an interactive logon. Automating startup of this was thought to be impossible, but I did it.
Here's how ... Autologons tool, set the machine to automatically log on as admin.
Create a Scheduled Task to automatically run 'At log on of admin'.
Scheduled Task points to a batch file to do what you want.
In my case the hard bit was writing the glue logic to make sure services waited for other services to start, and started in the right order ... etc.
The first request is impossible by batch file. But you have three options.
1. Some BIOSes support setting a timed power-on. If you're lucky, you can set that there. Alternatively, if no such option exists, set it it to turn on automatically when the power goes on, and put a timer on the plug. Schedule it to automatically shut itself down with a Scheduled Task before the timer yanks the power
2. If the machine runs continually, and you just want to restart it every day ... Task Scheduler. Set a scheduled task to restart.
3. If you have another computer on the same LAN that runs continually, WOL.EXE and a scheduled task to turn it on.
As for the rest of your request ... we have about 14 servers worldwide whose 'services', for ease of debugging, ran as console windows in an interactive logon. Automating startup of this was thought to be impossible, but I did it.
Here's how ... Autologons tool, set the machine to automatically log on as admin.
Create a Scheduled Task to automatically run 'At log on of admin'.
Scheduled Task points to a batch file to do what you want.
In my case the hard bit was writing the glue logic to make sure services waited for other services to start, and started in the right order ... etc.
Re: bat to power on + start programs Win7 Ultimate
macartm wrote:OK ... Well. I guess this is some kind of kiosk PC or just drives a screen display?
The first request is impossible by batch file. But you have three options.
1. Some BIOSes support setting a timed power-on. If you're lucky, you can set that there. Alternatively, if no such option exists, set it it to turn on automatically when the power goes on, and put a timer on the plug. Schedule it to automatically shut itself down with a Scheduled Task before the timer yanks the power
2. If the machine runs continually, and you just want to restart it every day ... Task Scheduler. Set a scheduled task to restart.
3. If you have another computer on the same LAN that runs continually, WOL.EXE and a scheduled task to turn it on.
As for the rest of your request ... we have about 14 servers worldwide whose 'services', for ease of debugging, ran as console windows in an interactive logon. Automating startup of this was thought to be impossible, but I did it.
Here's how ... Autologons tool, set the machine to automatically log on as admin.
Create a Scheduled Task to automatically run 'At log on of admin'.
Scheduled Task points to a batch file to do what you want.
In my case the hard bit was writing the glue logic to make sure services waited for other services to start, and started in the right order ... etc.
I leave it on, 24/7, hibernate mode, wake on LAN, etc, etc, Thanks for the many additional options!