Dmartin05
(Fresh Scripter)
2006-12-18 09:16 PM
IP Printer Migration

Hey All,

I am trying to find a way to do the following and I cannot figure out how to do it:

We currently have 2 Print servers that we are consolidating to 1. I want to run a script on the new print server that will look at a text file with the new IP Port and Share name and create it on the print server. I 1st want it to verify if there is any Printers already installed with the correct info, and if there is to move on to the next one.

Basically, I want thescript to look at a text file and add the IP Port and Share name to the new print server.

I have looked at ALLEN's UDF but I don't know if it can handle the amount of printers that I want to add. Also I don't think it compares to see if there is already a setup witht he same IP Port and share name.

NE help would be greatly appreciated..



Thx again


AllenAdministrator
(KiX Supporter)
2006-12-18 11:06 PM
Re: IP Printer Migration

Unless you have a bunch of the same type of printers, I think going through the process of figuring out/finding the printer driver inf, the descriptor within the inf, and actually running the Addprinter UDF, is not going to save you much time. Addprinter also does not have ability to share the printer (that is, in its current state).

NTDOCAdministrator
(KiX Master)
2006-12-18 11:06 PM
Re: IP Printer Migration

Please take a look at the post that is about 3 down from this one. It should give you all the information required to perform this task.

http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=171357


Dmartin05
(Fresh Scripter)
2006-12-19 05:16 AM
Re: IP Printer Migration

Thanks for both of your responses. I guess I should have mentioned that the old server currently has all of the old ip scheme. The new printers will replace the old ones and will go on a new server and will have a new ip. **Name will stay the same**

NTDOC: I did read the links and it looks like this would help me except for the fact that i am changing ips. I would also need some type of script to create the printer port and add the printer name to the new server.
I can definitely use this down the road when the new printers have been created. thx


Allen: The good news is that the 350 printers are all the same model.
Can your UDF handle the creation of 300 new ip ports and adding the printers to the server?

Can I create a .txt file with the printer names and ip address of the new printer? Can it check to see if it exist already and to skip over it if it does?

Last but not least, is there a script that I can use to share all of the printers at once? (Via .txt file maybe)

Sorry for so many questions, I'm just trying to give you as much info as possible.

DM


AllenAdministrator
(KiX Supporter)
2006-12-19 08:22 AM
Re: IP Printer Migration

Here is a very primitive UDF for creating a printer share. Used with Addprinter you should be able to accomplish what you want.



SharePrinter()


AllenAdministrator
(KiX Supporter)
2006-12-19 08:42 AM
Re: IP Printer Migration

Quote:
Allen: The good news is that the 350 printers are all the same model.
Can your UDF handle the creation of 300 new ip ports and adding the printers to the server?

Can I create a .txt file with the printer names and ip address of the new printer? Can it check to see if it exist already and to skip over it if it does?

Last but not least, is there a script that I can use to share all of the printers at once? (Via .txt file maybe)

Sorry for so many questions, I'm just trying to give you as much info as possible.


I see no reason adding 1 or 300 would make any difference provided you've got your input correct. You could setup you text file as a comma separated file, or as an INI file. (Also see EnumINI, INI2Array, or ReadCSV in the UDF Forum) Include the share name in the text file at the same time as you add all the information for that printer. As for checking if it exists, you could check the registry for the particular IP port or try PrinterExist, or PrinterList (also found in the UDF Forum).


NTDOCAdministrator
(KiX Master)
2006-12-19 06:56 PM
Re: IP Printer Migration

I see a problem unless maybe using the new ip6 you can't have 300 of anything on the same subnet.

But still easy to work around.


Witto
(MM club member)
2006-12-19 07:16 PM
Re: IP Printer Migration

172.16.0.0/23 gives me 510 usefull adresses in one network

NTDOCAdministrator
(KiX Master)
2006-12-19 07:19 PM
Re: IP Printer Migration

I knew someone would reply ;\)

Les
(KiX Master)
2006-12-19 08:06 PM
Re: IP Printer Migration

Originally Posted By: Witto
172.16.0.0/23 gives me 510 usefull adresses in one network
Only 510? I feel short changed.


Glenn BarnasAdministrator
(KiX Supporter)
2006-12-19 08:36 PM
Re: IP Printer Migration

And how many would you like in order to feel satisfied?

Gargoyle
(MM club member)
2006-12-19 08:45 PM
Re: IP Printer Migration

Could always build a network of 10.0.0.0 /8

Dmartin05
(Fresh Scripter)
2006-12-22 07:20 PM
Re: IP Printer Migration

Thanks for all your reponses, NTDOC we have more than 1 subnet, so we should be OK.

I am in the middle of trying out all of the information that I have gathered from this post and testing it out.

I have successfully used the 1st Add Printer UDF, but how would I tell it to go look at an .txt file or excel sheet?


Gargoyle
(MM club member)
2006-12-22 07:24 PM
Re: IP Printer Migration

You can read a txt file with the ReadLine() function

Or you can write it as INI file and use the ReadProfileString () Function.

You can read more about them in the manual available online at http://www.kixtart.org/manual


Dmartin05
(Fresh Scripter)
2006-12-22 07:26 PM
Re: IP Printer Migration

WOW Talk about Reponse time!
THX Gargoyle.... I will read the link above