JScript Samples

The following command-line script samples, written in Microsoft JScript®, provide simple functionality such as starting and stopping Windows Media Services, monitoring client connections, and manipulating publishing points. They are intended as a starting place from which you can expand the functionality as needed.

Note

   If you are using this sample from the Platform SDK, you must register it before you can compile with Visual Studio. On the Windows Start menu, point to Programs, point to Microsoft Platform SDK for Windows Server or the equivalent on your computer, point to Visual Studio Registration, and click Register PSDK Directories with Visual Studio.

To run these samples with Scheduled Tasks

  1. Click Start, point to All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.

  2. Double-click Add Scheduled Task, and then click Next.

  3. Click Browse and search for the sample you want to run in the \Program Files\Microsoft Platform SDK\Samples\multimedia\WindowsMediaServices9\JScript folder.

  4. Specify a name for the task and select how often you want the script to run, and then click Next.

  5. Based on the frequency value you selected on the previous page, you can further specify when you want the script to run. When you are finished, click Next.

  6. Administrator privileges are required to modify settings of Windows Media Services, so enter your administrator credentials and then click Next.

  7. Select the Open advanced properties for this task when I click Finish check box, and then click Finish.

  8. In Properties, in the Run box, enter any command-line arguments after the path of the JScript sample, and then click OK.

The JScript sample will now run on the date and time specified in your scheduled task.

The following sections discuss the JScript samples in more detail.

See Also

Concepts

Samples_wms_sdk_1