x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 

Automatically updating Windows CE Channel Information using the Windows NT Schedule Service

CESD|200165

Applies To

  • Windows CE 2.0
  • Handheld PC Professional
  • Handheld PC 2000
  • Palm-Size PC 1.0, 1.1, 1.2
  • Windows NT 4.0

Overview

By default the Channel Wizard application lacks the ability to automatically synchronise Channel content based on a schedule. This functionality was later added into ActiveSync as a module for Internet Explorer's Off-line Folders service, however this functionality only interoperates with the Pocket PC.

This article discusses how to setup automatic synchronisation using the original Windows NT 4.0 Schedule service

More Info

Original Windows NT 3.51 and Windows NT 4.0 releases shipped with a now legacy scheduler system service named 'Scheduler'. The schedule service under Windows NT 4.0 was later replaced by the Internet Explorer Active Desktop Shell's Task Scheduler Service. The Task Scheduler Service provides a more robust, and user friendly experience over the original Windows NT service.

In order to make use of the newer Task Scheduler you must upgrade your Windows NT Install to use the HPC:Factor Internet Explorer 5.5 SP2 installation. This will upgrade the Windows Services manager to make use of the updated components.

Users running the Task Scheduler Service with Internet Explorer should follow CESDS0099.

How-to Guide

  1. Open Schedule Services from the Control Panel: Start > Settings > Control Panel. Double click on "Services".
  2. Highlight "Schedule". If the Status of this service is "Started," discontinue the service by pressing the "Stop" button.
    Services List

  3. Then press the "Startup..." button.
  4. On the "Services" dialogue press the "..." button which is located to the right of the "This Account" field.
    Change Account

  5. In the "Add User" dialogue, select your domain from the "List Names From" drop down box. Then highlight your name in the "Names" list, and press the "Add" button. After your name appears in the "Add Name:" field, press the "OK" button.

    HINT: If you don't know your domain or user name, press the "Ctrl", "Alt", and "Delete" keys all at the same time. You can find your user name and domain information under "Logon Information". These will be in the format of DOMAIN\User name. Press the "Cancel" button once you are done.
  6. In the "Service" dialogue, type the password which you use to log on to the Windows NT machine in both the "password" and "confirm password" fields, and click "OK".
  7. In the "Services" dialogue, under the "Startup Type" selection, choose "Automatic". Press the "OK" button.
  8. Press the "Start" Button". The Status of "Schedule" should change to "Started". Press the "Close" button.
    Services Listing

  9. Open Notepad: Start > Programs > Accessories > Notepad.
  10. In Notepad, enter the Mobile Channel Wizard instructions that you would like to run.
    Note: Make sure your entry is all on one line; do not press enter!

    For example entering:
    "c:\Program Files\Mobile Channel Wizard\wceocw.exe" -c http://www.hpcfactor.com/default.asp -s -k 1000 -l 0 -m -u
    will create a Mobile Channel out of http://www.hpcfactor.com/default.asp

    Bat file code

    The -letters that follow "c:\Program Files\Mobile Channel Wizard\wceocw.exe" are options which effect the Mobile Channel that is created. In the above example
    • [-c http://www.hpcfactor.com/default.asp] begins the creation of the Mobile Channel at the starting page http://www.hpcfactor.com/default.asp
    • [-s] places the channel in synchronisation options
    • [-k 1000] downloads a maximum of 1000 kilobytes
    • [-l 0] in addition to the starting page (http://www.hpcfactor.com/default.asp) download 0 levels of links
    • [-m] specifies that sound and images are to be included
    • [-u] causes unrestricted following of links

    NOTE: The [-c URL] and the [-s] are both required options. The default settings when other options are not used are: to have unlimited download size, in addition to the starting page download 0 levels of links, do not download sound and images, and to limit followed links to pages within site and below the starting page (selected in -c).

    Below is a listing of options that can follow after "c:\Program Files\Mobile Channel Wizard\wceocw.exe":

    Usage: "c:\Program Files\Mobile Channel Wizard\wceocw.exe" [-c {URL}] [-s] [-k {n}] [-l {n}] [-m] [-p {directory}] [ [-o] | [-u] ]
    -c {URL} starting page to begin download (required)
    -s Automatically subscribe to generated channel (place in channel synchronisation options) (required)
    -k {number} Maximum download size (KB) (default is unlimited)
    -l {number} in addition to the starting page, number of levels of links to download (default is 0)
    -m download Images and Sounds (default is not to download Images and Sounds)
    -p {directory} path to publish to generated CDF into
    -o limit followed links to pages within site (default is pages within site, and below the starting page selected in -c)
    -u unrestricted link following (default is pages within site, and below the starting page selected in -c)
    -? help


  11. From the "File" menu, select "Save As", and navigate until you are in the directory in which the Mobile Channel Wizard was installed (c:\Program Files\Mobile Channel Wizard).
  12. Set the "Save as type" field to "All Files" and type "update.bat" in the "File name" field. Click the "Save" button.
  13. Close Notepad.
  14. Begin the Run command: Start > Run. The Run command is used to schedule the running of the "update.bat" file at regular intervals.
    For example entering:

    at 13:08 /interactive /every:M,T,W,TH,F,S,SU "c:\program files\mobile channel wizard\update.bat"

    into the Run command, will use the "at" command to schedule the running of the "update.bat" file every Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday at 1:08 pm.
    The "at" command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the "at" command. Below is a listing of options that can follow the "at":

    Usage: at [\\computername] time [/interactive] [/every:date[,...] | /next:date[,...]] "command"
    None When used without parameters, "at" lists the scheduled commands.
    \\computername Specifies a remote computer. If this parameter is omitted, the commands are scheduled on the local computer.
    Id Is an identification number assigned to a scheduled command.
    Time Specifies the time when command is to run. Time is expressed as hours:minutes in 24-hour notation (00:00 [midnight] through 23:59).
    /interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs.
    /every:date[,...] Runs the command on every specified day(s) of the week or month (for example, every Thursday, or the third day of every month). Specify date as one or more days of the week (M,T,W,Th,F,S,Su) or one or more days of the month (using numbers 1 through 31). Separate multiple date entries with commas. If date is omitted, the current day of the month is assumed.
    /next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). Specify date as one or more days of the week (M,T,W,Th,F,S,Su) or one or more days of the month (using numbers 1 through 31). Separate multiple date entries with commas. If date is omitted, the current day of the month is assumed.
    "command" the Windows NT command, program (.EXE or .COM file) or batch program (.BAT or .CMD file) to be run. When the command requires a path as an argument, use the absolute path, that is, the entire pathname beginning with the drive letter. If command is on a remote computer, specify the server and sharename, rather than a remote drive letter. You may use quotation marks around the command, whether you are using the "at" in a command line or in a batch file.
  • To stop the scheduled running of the Mobile Channel Wizard use the Run command (Start > Run) and enter the following:

    at /delete /yes

    This deletes all commands to be run by the "at" command.
  • If the Channel needs to be updated outside of scheduled updates, run the "update.bat" file by using the Run command (Start > Run) and enter the following:

    "c:\program files\mobile channel wizard\update.bat"
  • To schedule automatic updates of multiple Mobile Channels created by Mobile Channel Wizard go to the run command (Start > Run) and entering the following:

    Notepad "c:\program files\mobile channel wizard\update.bat"

    Notepad will open the "update.bat" file. On a new line, following the commands already present in the file, enter the new Mobile Channel Wizard instructions, similar to step 10.

    In the "File" menu, select "Save", and close Notepad.

Notes for Modem Users

If the Mobile Channel Wizard has been scheduled to run during times when the computer is not already connected to the Internet, the user will be prompted to connect. To avoid manually stepping through the connection process, try either of the following options:

  • Schedule updates to occur only when modem is connected. This may mean leaving modem connected if scheduling of frequent updates is desired, or scheduling updates less frequently.
  • Checkmark the "Save password", and "Connect automatically" boxes. This will allow "Dial-up Connection" to automatically make a connection without user intervention.
    Dial-up networking
WARNING: This will allow anyone to make a connection from the computer without the need of a password.

To automatically disconnect after updating the Mobile Channel take the following steps:

  1. Open Internet Explorer from under Start > Programs > Internet Explorer > Internet Explorer or by double clicking on the desktop icon.
  2. Under the "View" menu choose "Internet Options...".
  3. Select the "Connection" tab, and press the "Settings..." Button.
  4. Checkmark the "Disconnect if idle for X minutes" box. In the minutes dialogue select how long after downloading the Mobile Channel, the computer should disconnect.
    Note: This will break connections any time the computer is idle for the specified amount of time.

Acknowledgements

The information in this article was in part originally published by the Microsoft Corporation.