How can I configure applicatons to launch automatically on a CE Panel?
In general there are some applications which shall be launched automatically on a PCD7.D5xxx Web Panel (e.g. SBC.Net WebConnect, the Microbrowser, the VNC Server of similar). This can be done via a startup.bat file know from Windows.
Principle of operation
In Windows CE there is a kind of "Autoexec"-function, e.g. to start programs automatically after the boot process of the operating system has finished. On the CFC Compact Flash Card you will find a directory called "StartUp". All executable files (*.exe) or a batch files (*.bat) stored in the startup directory are executed automatically by the operating system at the end of the boot process.
>>> Path to the startup directory: "\Storage Card\StartUp"
Theoretically, you could just placing the programs to be launched into this folder, but by doing so, you can't control the order, in which the programs are started. The operating system will start the programs in a sequence which is not predictable: it depends on the location of the file inside the file system. It i stronly recommended not to rely on a alphanumeric order! It’s much better to use only a single bat file, which contains all the operations and paths to programs, which you like to perform or start. Within the bat file you have full control over the sequence of the executed commands.
Saia PCD® Windows CE Web Panels come with a well commented batch file ("Startup.bat"). In the default setup, it's copying a couple of shortcuts onto the desktop and launching the Web-Connect communication driver. But you can taylor it to your own needs.
Editing the startup.bat file
For launching applications on a PCD7.D5xxx Web Panel (Windows CE based), modify the startup batch file "startup.bat" accordingly. This can be done with the following steps:
- Open a text editor, e.g. Wordpad which is pre-installed on every PCD7.D5xxx panel (from the Windows Start button select "Programs" --> "Word Pad")
- From Menu "File" select "Open"
- Select "All files *.*" in the file type selector
- Browse to "storage card/startup/" and select the file "startup.bat"
- In this file, remove the "REM" before the following two lines in case you want the MicroBrowser to be launched automatically:
\Storage Card\Tools\Delay.exe" 5000
START "\Storage Card\Micro-Browser\MicroBrowser_CE.exe"
- (if you also want to lauch other applications, remove the REM before the relevant lines)
- Store the file and execute a reboot button from the Saia PCD® WebPanel Manager (don't just switch the panel off!)
- Lines starting with "REM" are comments
- To execute a program, simply write the complete path including the filename. If the path contains space characters (as in "\Storage Card"), enclose the whole path with quotes ("). e.g.:
Please be aware that executing the batch file will only continue after the called program terminates. So if the program doesn't terminate, the batch file hangs.
- If called programs don't terminate and stay resident in memory (like the Web-Connect), use the START command. The program is started, but the batch process doesn't wait for termination. Execution of the batch file is continued.
- It is also possible to copy files from one location to another:
COPY source.dat destination.dat
- ECHO ON switches the output to the console on. That means, that all the executed batch commands are listed in the console window.
ECHO OFF suppresses the console output. The executed batch commands are hidden.
Don't use the "SBC Autostart Editor" (switch off this autostart) but use the file: startup.bat.
PCD7 / D5xxx (Windows CE)
Last update: 28.05.2015 09:10
First release: 06.02.2007 09:50