Thats right... Its a migration...
But I'm not sure how the migrator will serve the purpose... Coz I'm looking at having everything new on my server (new drivers, eliminate dead queues and printers that are not in the DNS)
Well, to start with one printer, I'm trying to run the following VBS code:
'*************Register prnadmin.dll file on client computer***********
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run"regsvr32 /s \\server\Folder Name\Prnadmin.dll",1,TRUE
'************** Create the port first *******************************
Set WshNetwork = WScript.CreateObject("WScript.Network")
'gets computer name
strComputer = WshNetwork.ComputerName
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewPort = objWMIService.Get _
("Win32_TCPIPPrinterPort").SpawnInstance_
'before adding printer we need to create ports that printers will use
objNewPort.Name = "xx.xx.x.xx
objNewPort.Protocol = 1
objNewPort.HostAddress = "xx.xx.x.xx"
objNewPort.SNMPEnabled = False
objNewPort.Put_
If Err <> 0 then
msgbox "Error on installation of printers."
end if
msgbox "End of installation of printers."
It gives me an error "SWbemObjectEx: Access Denied"
Can you tell me if I'm missing something in my code??
Thanks!!