Microsoft KB Archive/821504

= HOW TO: Edit the Registry to Add Additional Schools to Class Server =

Article ID: 821504

Article Last Modified on 6/19/2003

-

APPLIES TO


 * Microsoft Class Server 3.0 Standard Edition

-





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



IN THIS TASK
 SUMMARY 

Overview

 

Edit the Registry to Add Additional Schools to Class Server

 

Save and Configure Each School That You Add to Class Server

 REFERENCES



SUMMARY
This article describes how to add additional schools to Microsoft Class Server by editing the registry on the server.

back to the top

Overview
Class Server can support multiple schools from the same server. Each school must have a unique database name, a unique primary virtual directory, and a unique server data folder location.

When you enable support for multiple schools to Class Server, you can add additional schools one at a time by using the Microsoft Class Server Configuration tool. For more information about how to do so, see &quot;Appendix C: Multiple Schools and Servers&quot; of the Microsoft Class Server Administrator's Guide, located in the root folder of the Microsoft Class Server 3.0 CD-ROM.

In situations where you want to add a large number of schools to Class Server, you can edit the values in the registry that store school information. You must specify the following registry values for each school that you want to add:

'''

'''

  (if present)

'''

'''

To do so, you can use the Class Server Configuration tool to create one school, and then use the registry entry that is created for that school as a template to create additional registry entries for each school that you want to add. For example, to add additional schools to Class Server:
 * 1) Use the Class Server Configuration tool to create one school.
 * 2) Export the registry keys that store school information to a .reg file.
 * 3) Use the .reg file as a template, create separate .reg files for each school that you want to add.
 * 4) Import the .reg files that contain the information for each of the schools that you want to add to the server.

back to the top

Edit the Registry to Add Additional Schools to Class Server
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.

To edit the registry to add additional schools to Class Server, follow these steps. <ol> Use the Class Server Configuration tool to create a school (if you have not done so already).</li> Export the registry information for the school that you created in step 1 to a .reg file. To do so, follow these steps: <ol style="list-style-type: lower-alpha;"> Click Start, and then click Run.</li> In the Open box, type regedit, and then click OK.</li> Locate and then click the following registry key, where  is the GUID of the school:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Class Server\Server\Schools\ 

</li> On the File menu, click Export Registry File.</li> In the Export Registry File dialog box, specify a file name and location where you want to save the file, and then click Save.</li></ol> </li> Start Notepad and open the .reg file.</li> Edit and create .reg files with the appropriate information for the schools that you want to add.

Note Before you perform this step, make sure that you use a consistent naming convention for the names of the school, database, and directory names and for the names of .reg files that you create for each school. By doing so, you can easily identify the school that you are adding with name of the .reg file. For example, if you use School1, School2, School3 for the school names, use School1.reg, School2.reg, and School3.reg for the .reg file names.

To do so, follow these steps: <ol style="list-style-type: lower-alpha;"> Replace all occurrences of the existing   value with the new school name. For example, if the existing school name is School1, and you are adding a school that is named School2, find all occurrences of School1 in the School1.reg file, and replace it with School2.</li> Modify the last two characters of the   value so that you can identify the school that you are adding. For example, if you are adding School2, change the last two characters of the  value to 02, and then increment this value by 1 for each additional school that you add.</li> Increment the   value by 1.</li> On the File menu, click Save As.

In the File name box, type the appropriate file name for the .reg file. For example, if you are adding a school that is named School2, type School2. Specify a location where you want to save the .reg file, and then click Save.</li></ol> </li> Double-click the .reg file that you created to add the new school information to the registry.</li> Repeat steps 3 through 5 for each school that you want to add.</li></ol>

back to the top

Save and Configure Each School That You Add to Class Server
You can save and configure each school that you add to Class Server individually when you click Save & Configure in the Class Server Configuration tool. Or, you can automate the registration of all schools that you add by creating a batch file that contains the following command line, where  is the GUID of the school:

config.hta /config 

The following is an example of a batch file that saves and configures all schools that you add, when you increment the  value of the schools that you add by 1, as described earlier in the &quot;Add a Large Number of Schools to Class Server&quot; section of this article:

<pre class="fixed_text">del RegisterMany.bat

@rem **** register many schools hta register ****

@rem **** This script creates the batch file you need to run to register your schools. **** @rem **** Edit the first Do statement to reflect the number of schools that you are registering. **** @rem **** Insert your school GUID, less the last three digits, in place of the GUID below. ****

@echo. >> RegisterMany.bat

Do i= 1 to 100

Iff %@len[%i] == 1 then set j=00%i Else iff %@len[%i] == 2 then set j=0%i

Else iff %@len[%i] == 3 then set j=%i

Endiff

@echo. >> RegisterMany.bat

@echo Config.hta /Config 935B150F-5574-4E1D-B6D4-4230F16E1%j >> RegisterMany.bat

enddo

back to the top

<div class="references_section">