Schedule computer for auto-play
These are my quick notes with instructions, tips, links, etc I used to install a program and run it continuously for more than a year on a computer.
There are already similar articles online for MacOS and PC:
- Prep Windows machine for fulltime exhibition setup
- How to make an installation stay up 4evr (Mac OS X version) and the updated version: Update on Github
- Configuring Mac OS X for Interactive Installations
This article describes my set up for a specific context on a PC running Windows 7.
- An animation (Flash based) needs to run fullscreen on a monitor between 6am and 8pm everyday of the week in the waiting room of a hospital.
- The computer and the animation program need to be able to start, run and stop without any human intervention.
- There is no need for any kind of connection (Internet, wifi, bluetooth, remote, etc...)
Hardware & software
The computer and the display are recycled from the hospital's hardware stock. The PC (HP) has a clean install of WIndows 7. The IT staff of the hospital removed all possible remaining data from the PC and made it impossible to connect to the secured network of the hospital.
Content first: the animation
Rather obvious, but still noteworthy: first of all I made sure the animation was ready. It is made with Flash and exported as a .exe file with an embed of a necessary Flashplayer. This avoids the need to install a Flash player on the PC.
The animation is set to run full screen, hide the mouse pointer and any (Flash)menu. I also made the animation automatically close itself, like around 5 minutes before the computer will be turned off. This is to avoid any annoying messages about programs closing unexpectedly.
Clean up desktop
- Remove all icons on desktop.
- Hide taskbar/dock
- Put all files you need to run or use in a folder (Documents): animation program, wallpaper and .bat file
I want a complete empty desktop with no icons to any file or program. If by accident, the animation stops running, and only the desktop is visible, I want to show at least some kind of pretty image to look at.
The cleaned computer already had an almost empty desktop. I only had to remove the Recycle Bin icon from desktop:
- Right-click on the desktop, choose Personalise
- Choose Desktop Icon settings on the left-hand side.
- Simply remove the check from the box.
Here is the how-to: Hide, delete or destroy the recycle bin icon in Windows
Hiding the taskbar/dock in Windows 7 via the Control panel still leaves visible a very slight light grey line at the bottom of the screen.
An easy way to get rid of 1 pixel border: adjust settings of standalone screen:
see: How to remove taskbar border aut hide
There are other solutions, but I prefer to avoid installing extra apps or fiddling around with registry: see: Shybar (app), Hide taskbar hotkey, Task homie (app), Make it totally disappear, How to remove a taskbar
Start the animation automatically when computer starts up
Whenever the computer is turned on, it should automatically start the full screen animation without delay.
This is quite easy to do on Windows 7:
- Create shortcut of your program and drag it in the start up folder of the start menu.
- Make sure that no other unnecessary programs will start up.
Stop the animation automatically before shutdown of the computer
The animation already exits itself. But I am not sure if this really stops the whole program. It might be that the exit command in Actionscript only stops the swf file, and not the Flashplayer? So I also created a basic task in Task scheduler to stop the program before shutdown of the computer to avoid annoying notification windows after reboot.
- First create .bat file with Notepad with this line: taskkill /f /im "name-of-your-program.exe"
- Save as ANSI with .bat extension.
- Then create basic task in Task scheduler: choose start a program and point to this .bat file. Choose a time to stop: e.g.: 23:50
Shutdown the computer daily
I want the computer to shutdown completely every day. This is to avoid possible problems that might occur from running a flash file on a computer endlessly. (Memory leaks, etc...) It is also a good practice to save energy. No need to run anything during the night or when no people are present. Lights out! This again can be done with the Windows Task Scheduler.
- Create a basic task with Task scheduler
- choose shutdown.exe (C:\Windows\System32\shutdown.exe) and a time to shutdown, e.g.: 23:55
- Use these arguments: /s /f /t 0
/s will shutdown the computer
/f will force close the currently opened applications
/t xxx, xxx seconds before the computer shuts down.
- How to schedule computer to shut down at a certain time in the night
- Schedule Shutdown or Restarts in Windows using the Task Scheduler
- How to schedule a shutdown, reboot or hibernation in Windows 7
Automatically start the computer daily in the morning
This seems only possible by changing a few things in the BIOS of the computer. (F10 during start-up) I could access the BIOS, but it was locked with a password for obvious security reasons. The IT people of the hospital unlocked it for me. I followed this guide and found the necessary settings under a Power-On labelled menu item, even if the BIOS on the HP looked a bit different:
Make sure the computer also restarts automatically after power off
This can happen easier than you might think. The computer will be set up in a room next to the exhibition space (the waiting room). There will be a day when somebody, for some reason will have a need to pull out the plug of the computer without realising that the display went black. Again I had to go into the BIOS.
Under advanced I found the item: "power after power loss" and set it to "on". When I tested, a black screen with white text appeared for a while (20sec) that gave you a multiple choice to reboot the computer. It automatically was set to 'Start Windows normally".
This is fine, but maybe there is a way to immediately reboot normally and skip this window?
There where no other notification windows after reboot.
The following minor settings are however not to be forgotten: (More details later)
- Switch off automatic updates via Control Panel > System and Security > Windows Update > Change settings and set to “Never check for updates”.
- Switch off screensaver via Control Panel > Appearance and Personalization > Personalization > Screen Saver and set the screen saver menu to (None).
- Switch off bluetooth because I do not need.
- Make sure the computer does not ask for a password on wake up/restart (automatic login)
- When press the sleep button: nothing should happen.
- I don't need network connection or sharing of files: switch off network and sharing connections
- Back-ups are not needed: no automatic back ups
- The computer should run in optimal conditions: no energy savings
- Switch off all possible notifications windows
- Switch off firewall
- I don't need sounds: mute all sounds
- Make sure the display settings are optimal: depends on the display
- Make sure the display does not go in energy saving mode during playback
- Make sure the computer is positioned well (fans do their work)
Author: Hans Verhaegen, Brussels, 2017