Microsoft Knowledge Base Article 321025 contains the following summary:

This step-by-step article describes how to programmatically create a printer and printer port by using the PrinterAdmin tool (Prnadmin.dll) and a Visual Basic script in Microsoft Windows 2000.