Microsoft KB Archive/828534

= Script Sample to Automatically Restart Windows Media Services 4.1 Stations After a Computer Restarts =

Article ID: 828534

Article Last Modified on 8/4/2004

-

APPLIES TO


 * Microsoft Windows Media Services 4.1

-



Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SUMMARY
With the Windows Media Services 4.1 server, you can set up multicast programs to broadcast content. This content is organized in programs and is broadcasted through individual stations. A server administrator must use Windows Media Administrator to manually start the programs that are to be broadcasted. Sometimes a computer may restart unexpectedly. If a computer restarts unexpectedly, a server administrator must use Windows Media Administrator to manually restart multicast programs that are being broadcasted (Windows Media Services has built-in mechanisms to restart streaming the content if connections between the server and upstream encoders or servers are lost for any other reason). Server administrators can use the sample that this article contains to automatically start these stations if the connection is lost because a computer has restarted unexpectedly.



MORE INFORMATION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

The following file is available for download from the Microsoft Download Center:

Download the WindowsMedia41-KB828534-x86-ENU.exe package now.

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

The English version of this sample has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time    Size   File name --  03-Sep-2003  22:41  10,754  Wms41_stationstart.vbs 09-Sep-2003 18:13      52  ExList.txt After you download the sample, make the following configuration changes to make sure that the sample is working.

Windows Media Services 4.1 Multicast Properties
To start a specific program, the program manager control must be able to get a reference to the program name. This sample assumes that the program name is the same as the station name. In this case, if a multicast station is named &quot;Station1,&quot; the corresponding program is also named &quot;Station1.&quot; By default, the multicast wizard in Windows Media Administrator may name this &quot;Program1.&quot; Therefore, you may have to rename the program to correspond with the naming convention that this sample uses. For more information about creating multicast stations or renaming programs, see the Help documentation that is included with Windows Media Services.

Exclusion List
Sometimes the server administrator may not want to start every station that is on a computer. With this sample, an administrator can exclude stations that the administrator does not want to start. The sample looks for a file that is named ExList.txt and that is located in the directory that the sample script is installed in. The format of the text file must be similar to the following: ; List program names to not start [ExclusionList] Station3 Station4 Station7 In this example, Station3, Station4, and Station7 are not started.

Registry Setup
For the script to run automatically after a computer restarts, the computer must be set up to log on automatically. The script must run as an account that is a NetShow administrator. The account does not have to be a member of the Administrators group. After the script is called, the script makes a call to lock the workstation and continues running. To set up the script to run when the user logs on to the computer:  Log on to the server as the user who you want to run the script under. Start Registry Editor. Locate the following key:  Create a new string value, and then name the value WMStart . Set the value of the key to the following, where &quot;C:\Autostart&quot; represents the path to the script file:

cscript.exe C:\Autostart\WMS41_StationStart.vbs



You must also enable the automatic logon feature for this account so that the script will run when the computer is restarted. For additional information about how to enable automatic logon, click the following article number to view the article in the Microsoft Knowledge Base:

324737 HOW TO: Turn On Automatic Logon in Windows

The functionality that is described in this article has been incorporated in the Windows Media Services 9 Series. The Windows Media Services 9 Series is included as part of the Microsoft Windows Server 2003 family. Microsoft recommends that users upgrade to the latest version of the server to obtain the extended features and functionality of the next version of the server.

Additional query words: WMS station restart sample

Keywords: kbinfo kbdownload KB828534

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.