- #Vbscript print to console how to
- #Vbscript print to console drivers
- #Vbscript print to console code
Having only the poor log-which by the way is located in the %systemroot%\system32\spool\pm\ folder-resolving the migration problem or misconfiguration conflicts may become a delving task. Should this happen to you, neither of the printers will be shared. But the most confusing thing is the printer share names collision. Thus, if you have ports sharing the same name but using different port monitors, all those ports that are linked to the port monitor with highest queue numbers (remember the number is directly connected with the sorting which is performed alphabetically) will be dropped from the connection. The ports are sorted in alphabetically what means that the process works in the FIFO mode. For example it is known that several port monitors may share the same port names. On the paper it sounds pretty easy but for the large organization with multiple groups and OUs in Active Directory and several buildings or even branches like with our company it eventually may become a really complicated task. First off, revise all the printer naming checking whether you would face with port and printer share collisions. While printer migration is a relatively simple process in theory, in practice it appears that when abused it may result in serious issues with all the print operations getting stuck across your company.
#Vbscript print to console drivers
Pay attention to what drivers you will be migrating, what drivers you have already deployed to the destination server and which of them may cause conflicts. It's a nice tool but requires doing all things with a maximum accuracy. I, however, would note that it requires a clear understanding of what you want to do with it and I highly recommend you consider a thorough printer migration process planning before you do anything with it. Sure thing, Print Migrator 3.1 despite the fact that it looks a bit outdated being issued back 4 years ago it still remains a good tool to move the print configuration data form one server to another. ObjNetwork.RemovePrinterConnection objPrinter.Name ObjNetwork.SetDefaultPrinter ("\\" & PrintServer & "\" & PrinterArray(3)) ObjNetwork.AddWindowsPrinterConnection "\\" & PrintServer & "\" & PrinterArray(3) If (LCase(objPrinter.ServerName) "") and (LCase(objPrinter.ServerName) "\\" & PrintServer) then PrinterArray = Split (objPrinter.Name, "\") Set colInstalledPrinters = objWMIService.ExecQuery _įor Each objPrinter in colInstalledPrinters Wscript.echo ("Error : " & Err.Number & ": " & Err.Description & VbCrLf) Set objWMIService = GetObject("winmgmts:" & _ UserName = objShell.ExpandEnvironmentStrings("%username%") LogonServer = objShell.ExpandEnvironmentStrings("%logonserver%") Set objFSO = CreateObject ("Scripting.FileSystemObject") Set objShell = CreateObject ("WScript.Shell") Set objNetwork = CreateObject ("Wscript.Network") SDefault = Left(sDefault ,InStr(sDefault, ",") - 1) SRegVal = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device" The new print server must be already online and ready, as it removes the current printer and map again on the new print server You may call it with cscript to not send popup, or remove wscript.echo to not warn user. Jut replace MYNEWPRINTERSERVER with the new print server name.
#Vbscript print to console how to
#Vbscript print to console code