jd2369 0 Newbie Poster

I have this vbs script that works great for adding a printer, what do i have to do to create this in vb 2010? I would just like to add a nice user interface, please help

PrnName = "Toshiba2830"
PrnLocation = "Toshiba"
PrnComment = "Toshiba2830 PCL6"
PrnDrv = "TOSHIBA e-STUDIO Series PS3"
DrvPath = "c:\Toshiba\"
InfPath = DrvPath & "\eS4ex2.inf"
PortIP = "192.168.10.11"
PortName = "IP_" & PortIP

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

''''''''''''''''''''''''''
' create ip-printer-port
''''''''''''''''''''''''''
Set objNewPort = objWMIService.Get _
    ("Win32_TCPIPPrinterPort").SpawnInstance_

objNewPort.Name = PortName
objNewPort.Protocol = 1
objNewPort.HostAddress = PortIP
objNewPort.PortNumber = "9100"
objNewPort.SNMPEnabled = False
objNewPort.Put_

wsh.echo "Welcome to Atlantic's Add Printer Wizard"
wsh.echo "creating Network Port"

''''''''''''''''''''''''''
' install printer driver
''''''''''''''''''''''''''
' If the driver is not signed, one cannot use WMI scripting
' to install the driver. 
' Make sure the cat file for the package is copied to the same
' location as the driver 

objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True

Set objDriver = objWMIService.Get("Win32_PrinterDriver")

objDriver.Name = PrnDrv
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"
objDriver.DriverPath = DrvPath
objDriver.Infname = InfPath
intResult = objDriver.AddPrinterDriver(objDriver)

wsh.echo "Installing Driver"

''''''''''''''''''''''''''
' Add local printer
''''''''''''''''''''''''''
Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_

objPrinter.DriverName = PrnDrv
objPrinter.PortName = PortName
objPrinter.DeviceID = PrnName
objPrinter.Location = PrnLocation
objPrinter.Comment = PrnComment
objPrinter.Network = True
objPrinter.Put_
 
wsh.echo "Complete"

'optional:
''''''''''''''''''''''''''
' Stop & Start Printer Spooler
''''''''''''''''''''''''''
Set objSpoolerSvc = objWMIService.Get("Win32_Service.Name='spooler'")
iReturn = objSpoolerSvc.StopService()
iReturn = objSpoolerSvc.StartService()