How to Use Logon Scripts to Set Printers

Logon scripts are text files with Visual Basic Scripting (VBS) coding. The logon scripts can set passwords, map network drives and connect to network printers. You create these files using the Windows Notepad application, which is a part of the Windows accessories group. Each VBS file is run on the computer you want to edit. Logon scripts execute each time the user logs into the network.

Instructions

    • 1

      Click the Windows-logo button on the lower left-hand side of the screen. Type "notepad" into the Windows search text box in the pop-up menu. Press "Enter" to open the text editor.

    • 2

      Type the following code into the text editor:

      Set network = CreateObject("WScript.Network")

      network.AddWindowsPrinterConnection "\\pc\printer"

      The "\\pc\printer" is the path to the printer. "PC" is the name of the computer and "printer" is the name of the printer installed on the computer.

    • 3

      Click the "File" menu item. Click "Save As" to open the save dialog box. In the "File type" drop-down box, select "All Files."

    • 4

      Type "mapprinter.vbs" in the name text box. Click "Save." To check the file, double-click it on your computer. This tests your code and ensures the file executes properly.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured