VB.NET:
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\LPR Port\Ports\at-cetus.ad.ufl.edu:CSE-211-CLQ", "EnableBannerPage", 0, Microsoft.Win32.RegistryValueKind.DWord)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\LPR Port\Ports\at-cetus.ad.ufl.edu:CSE-211-CLQ", "HpUxCompatibility", 0, Microsoft.Win32.RegistryValueKind.DWord)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\LPR Port\Ports\at-cetus.ad.ufl.edu:CSE-211-CLQ", "OldSunCompatibility", 0, Microsoft.Win32.RegistryValueKind.DWord)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\LPR Port\Ports\at-cetus.ad.ufl.edu:CSE-211-CLQ", "Printer Name", "CSE-211-CLQ")
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\LPR Port\Ports\at-cetus.ad.ufl.edu:CSE-211-CLQ", "Server Name", "at-cetus.ad.ufl.edu")
Shell("net stop spooler")
Shell("net start spooler")
Shell("rundll32 printui.dll, PrintUIEntry /if /b "test_1" /f "C:\7760.inf" /q /r "at-cetus.ad.ufl.edu:CSE-211-CLQ" /m "Xerox Phaser 7760GX PS" /z /u")
Above is the code I am using to add the correct LPR Printers. The registry edits work just fine, however the port still doesn't show up in the printer server properties. and the last shell call has obvious problems and I can't remember the escape char, think it is "\", but it still doesn't add the printer when I hand code it in. What am I doing wrong and how can I properly add this printer with code??