PrintQMigrator [VBScript]
Par Sebastien le dimanche, 13 août 2006, 11:47 - Goodies - Lien permanent
If you need to migrate your print server on a brand new hardware, Microsoft will provide you a free tool to backup and restore all print queues definitions.
This utility is called "Print Migrator" aka "Printmig". It can be freely downloaded.
PrintMig is very usefull and friendly to use. In 2-3 mouse clicks, you will create a *.cab file that contains all drivers, ports and print queues parameters.
And what about all print queues defined by the users?!
How will you be able to update the printers of ALL your users?
PrintQmigrator is the solution!
General Description
Some years ago, at the old Windows NT4 time, Microsoft provided ChangePrint.exe in the Windows NT4 resource kit. This tool could be used in the login script and was based on a text file which contained all "Old/New print queues definitions".
However, ChangePrint does not run anymore on Windows XP. And the resource kit provide no solution to this problem. The official answer of Microsoft is: Windows XP support VB scripting, you only need to write some code.
That’s exactly what I done, trying to translatethe ChangePrint in VBScript. I tested my script when I migrated a big print server, and my tool does perfectly the job! I called it PrintQmigrator.
Usage
You can call PrintQmigrator from a login script (in \\DC\Netlogon or in a standard GPO). You can also put the text file containing all Old/New print queues definitions in the same location or on a file share. You can also have many text files as you want!
You can call PrintQmigrator from a batch file. Here is an exemple:
REM ============================
REM Migrate your print queues!
IF EXIST %WINDIR%\System32\wscript.exe %WINDIR%\System32\wscript.exe _
%LOGONSERVER%\NETLOGON\PrintQMigrator.vbe %LOGONSERVER%\NETLOGON\ChangePrinter.txt //B //NOLOGO
REM ============================
Synthax information
PrintQmigrator.vbe <TextFileFullPath.txt> --debug:LogFileFullPath.txt
Exemple:
PrintQmigrator.vbe \\FileServer\Share\Printers.txt --debug:\\FileServer\Common\PrintMigrator.txt
Or you can simply double click on the file PrintQmigrator.vbe and it will ask you for a text file where the print queues are defined.
Here is the structure of the text file, where you have to enter the data about your migration:
The PrintQmigrator text file is a basic CSV file, where the separator MUST be a semi-colon (;).
Below, you will find a good sample of a text file, that shows you can migrate the print queue on another server keeping the print queues' names or not. You can also keep the server but just rename the queues:
\\OldServer\OldPrintQueue;\\NewServer\NewPrintQueue
\\OldServer\OldPrintQueue1;\\OldServer\NewPrintQueue1
\\OldServer2\OldPrintQueue2;\\NewServer2\NewPrintqueue2
PrintQmigrator will only read the lines beginning with \\. So you can easily comment the file!
Features
You can use PrintQmigrator if:
- You change the name of your print server;
- You change the name of a print queue;
- You centralize many print server on a big print server (clustered one?);
- You decentralize your main print server on many servers located on branch offices.
PrintQmigrator is flexible, so you can:
- Migrate your print queues by small chunks;
- Place comments in the text file;
- Use a debug parameter to log all operations.
Download Instructions
My tool is given to the IT administrator's community. You can freely use it. You can encourage me to produce some other usefull tool by sending me a gift, from my Amazon Wishlist. Thanks a lot!
Support
Leave a comment below, I will try to support you.
Or you can send me a mail at this address: sebastien AT pittet DOT org.
Advertising
Place this banner on your webpage.

Commentaires
Pour les habitués: je sais que cet article est un remake. En plus, c'est très "info", alors que ce blog se veut moins "geek" que le précédent site web.
Mais... cela fait partie de la migration, il faut bien décommissionner l'ancien site...
Je me suis dit que ce genre de tool pouvait encore être utile pour quelques IT, même si d'autres scripts ont fait leur apparition.
Hello Brian!
I will take a look and post either a corrective or an advice. Thanks for your comments!Salut,
Ce serait bien de voir le script fonctionner de manière complètement tranparente...pas de recherche du fichier txt...à ce moment on met le txt au même endroit que le vbe.
Sinon le HelpDesk va pleurer...
@+
Salut Neeko!
En fait, le script fonctionnement également de manière complétement transparente... si on l'appelle en spécifiant les paramètres.Bonjour,
ce script fonctionne t il sur les postes Windows 98 ?
Il me semble que non...
Le script ne fonctionne pas sous Windows 98.
Il fait appel à la couche WMI, qui n'est pas présente sur cet OS.
Désolé...