Article ID: 304767 - View products that this article applies to.
This article was previously published under Q304767
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:
(http://support.microsoft.com/kb/256986/EN-US/ )Description of the Microsoft Windows Registry
By design, when a user is using a roaming profile, that user's default printer roams with the user profile. However, in some environments this may not be the desired behavior. This article provides methods you can use to alter this behavior.
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.
IMPORTANT: The information in this article is designed for use by corporate administrators. Before you use any of the methods that are described in this article in your environment, you should thoroughly test the method in a test environment.
Printers are designed to roam with a user's roaming profile, and this is why the default printer is stored under the HKEY_CURRENT_USER branch of the registry. To alter this behavior, use either of the following methods.
Method 1Export the default printer setting for an already-installed printer, and then merge the setting into the user's profile when the user logs on to the computer:
Method 2If computers in a specific area contain similar computer names, you can use a .vbs script file that matches a specific set of characters in the computer name, and installs a corresponding printer. The sample code that is included in this method only requires that you modify the IF lines. For example, the first IF statement in the code translates to "if the computer name contains the text "LAB1-", then set the default printer to "\\LAB1\LaserJet". To complete this method:
NotesIt is also possible to run the Defaultprinter.vbs file from a login script instead of the run key. Both of the methods that are described in this article reset the default printer that a user's profile is set to print to. Also, if the sample script that is included in this article does not run properly, you may need to upgrade or install the Windows Scripting Host from the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?FamilyID=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=enMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Contact us for more help
Connect with Answer Desk for expert help.