Link to home
Create AccountLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

Migrate /Backup /Restore a printer from Source Computer to Destination Computer

Migrate /Backup /Restore a printer from Source Computer to Destination Computer

I would like to have a a printer installed on one computer and the same printer will be installed on other computers. There is no Print Server.

I found this link that talks about that:

it also has printer commands on this link:

Thank you
Avatar of arnold
Flag of United States of America image

Not sure I understand, though install on one, while sharing. Then add this shared printer on any new system, then change it to direct.

Deals with getting drivers from the system sharing the printer.
On the second, add a TCP/ip port with ip if the printer, and then bind the printer to the new TCP/ip port.

Which printer make?

Main issue is whether the printer in question has drivers included in Windows.
If it is an HP as an example whose drivers are included in the OS.

You could look at powershell, vbscript net use to create the printer by correctly pointing at the driver..
If the printers are network printers use the scripts on this page
Avatar of jskfan


Printers Install  Scripts were not successful for me. I posted a bunch of questions about that, I did not get help
The Scripts will install printer on remote computer, but  it will not print..

I thought probably if you install local printer[TCP/IP Standard] then back it up to somewhere in the network, then from another computer restore  it , that might do the job.
What you are talking requires the drivers for the printer to be locally available.
Much depends on the printer at hand.
In a non-domain environment, you have  to access each system any way, might as well do it right from the start.

Inevitably some may not work for ... And would require a secondary debug, .......
Avatar of jskfan


if I go to a computer and install the printer, the manufacturer and drivers are available in the Add printer Wizard..
The powershell example of migrating/transferring shoukd work.

The issues often arise are with the spoiler.

How many systems are we talking about?
Avatar of jskfan


let's try it with one remote computer
Commonly it is used on server platform for transition

Try the example dimitris provided.

The other to see is using wmi

Much in a non domain environment depends on the Windows firewall and whether it allows remote access.
Avatar of jskfan


I guess you misunderstood my question.

Let 's say I have local (TCP/IP standard) printer installed on PC1
the same printer needs to be installed on PC2,PC3.....PCn

I thought if I backup the printer that is installed on PC1, I can restore it to PC2,PC3.....PCn

is it possible ?

I found  this link :

it seems like this guy was able to get a printer installed on one PC and then  exported the registry he specified to a .reg file , and probable he deployed that .reg file along with the script to other PCs...

but the way he explained is a little bit not clear to me
that is exactly what it was, but as you note you have to have the paths to the INF file and the ....
c:\windows\system32\inf etc.

that is the issue when one is using powershell as well or net use to define a new printer...

The issue is that you are not in a domain environment, so not sure how you are thinking of pushing the printer ....
windows 10 has auto-dicovery, but the printer might have to be .....

In a situation such as yours, I commonly do what I had suggested after the printer is added and shared. I add the shared printer and then modify the references ......
That rundll32.... is an older printui.. reference.....
The powershell script is for servers, but it enumerates the printers/shares on the system where the script runs so that they can be imported/setup on the new server...

You could try whether it will list the printer on the base system and then see whether you can use the results to setup the printer on another system,..
Avatar of jskfan


I do not want you to worry about the computer is or is not in the Domain....We can make it member of the Domain..

can you do a test by installing an HP printer [with HP Universal Printing PCL 6 as a driver] on a remote computer with a Script ?
Universal means, you used hp's installer to setup the printer?
As noted, in a scenario such as yours, I use the course of action I suggested.
Avatar of jskfan


if I am logged in to a computer locally I just run Add Printer Wizard and select the "HP Universal Printing PCL 6" as a driver...everything works fine.

I want an Expert to help me install the printer on a remote computer using a script or command line...or something like that....
I have seen many suggestions from many people but no one has tested it to make sure it worked...
Please try the powershell script posted that deals with helping an admin transfer shares and printers.
Run the powershell script to see what it shows.
Then try using the result to setup the printer on the new computer.

There similarly are vbscripts that do the same thing.
I do not believe the printer and devices control panel, or however the printer is presented provides a backup or restore option.

The various scripts deal with extracting the current config and commonly provide the commands that need to be run to get it added ...
Avatar of jskfan


I have used VBscript for printers included with windows OS.
I can add printer to remote computer but it does not print
I think the issue is with Registry...
I found this link:

but it is not clearly explained...
Can you read it and maybe you can come up with better conclusion ?

Thank you
You are using/referencing an older rundll/printui interface.

Which vbscript are you using? Ties into wmi, or using psexec?

Please consider looking at a more modern approach to printer addition...
Avatar of jskfan


if you check in this path below, on your windows computer, you will find a bunch of Printing Scripts that comes with the Operating system:

I have used: PrnPort.vbs , Prndrvr, Prnmngr
I was able to get the Printer Installed on Remote Computer, but unable to Print from it...
On the Local computer, for instance if I install the printer via the Scripts, it will install properly and I can print...This might tell you something

**If you have 2 computers, please try to install a Standard TCP/IP printer with driver "HP Universal Printing PCL 6"  , and paste  the Code here, so that I can try it .... Whatever approach works for you will be fine
Thank you
When you can not print, where is the error. In the spool pending or it errors in the print i.e. get error about the printing system?

Is the spool service running past install.

While you are adding tcp/ip properties of the printer, is it bound to this port?

The steps/commands are one thing, the resulting config might have a small variation as simple as the printer instead of being attached to a tcp/ip it is bound to something else resulting in the job being stuck in the spool.
Avatar of jskfan


here is the error.. when I try to check the properties of the printer on a remote computer after the Script installs the printer
User generated image
I tried several scripts , one of them is here:
for /f %%a in (C:\Scripts\CalledScripts\CompOnly.CSV) do (

@echo Creating Printer Port on %%a
 cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\prnport.vbs" -a  -s %%a -r "Printerhostname" -h hostname -o raw -n 9100

cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\Prndrvr.vbs" -a   -m "HP Universal Printing PCL 6"  -h "sccm\hp drivers\hpcu230u.inf" -s %%a

@echo Setting Printer on %%a
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -a -p "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a


Open in new window

The error seems to point to your "Printer Queue Name" designation as the issue.

The queue name ........ Of the installed printer......
Avatar of jskfan


have you tried to install a printer on a remote computer using a Script ?
If you have 2 Networked computers either physical or virtual, please try it and let me know if you were successful..
Thank you
As I noted in my suggestion, the scope of the need did not require the extensive process. Used the script I posted that dealt with migrating printers/shares from servers.
In most cases I am in an AD environment and use printer server and GPO to push printers.

So the direct answer is no.
With that said, the error you get is not the printer did not install, the issue is that it tied to a queue that does not exist.
Avatar of jskfan


With that said, the error you get is not the printer did not install, the issue is that it tied to a queue that does not exist.

Of Course the Queue should not exist before you create it...
I see You are thinking Print Server , where the Print Queue already exists on the server...
This is a different case scenario....I am not sure if I am clear in my Question... I believe it is simple:

Current Manual Printer Install:
  -- Go to each Computer, run the Add Printer Wizard, Select Local Printer, TCP/IP Standard,  Provide the Hostname of the printer, Select HP as Manufacturer , "HP Universal Printing PCL 6"  as a driver... Next ...Next.... and it will install the local Printer.

How to Automate Current Manual Print Install
you need to use the prnqctl.vbs

In your example you run printer setup, prnmngr.vbs before you created the queue while setting a queue that does not exist.

Here is a writeup of the tools you are using.
missed you are not defining the queue.
-q "QueueName" you have -p "Printer Queue Name"

Try the following instead in your script                                                                              v
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -a -q "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a
Avatar of jskfan


are you sure there is -q switch...?
it is not recognized ...
Avatar of arnold
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
prnports.vbs is where the queue can be defined, optional.
Relied on the data I. The quotes.

Your prnmngr.vbs identifies the printer -p as "Printer Queue Name"
-p is supposed to identify the printer being added...
Avatar of jskfan


ok you meant Prnport.vbs
You should recheck the scripting command you are using and their options.

You are running through a loop of perhaps multiple printers to be added, though PortName, printer name use static names.
Avatar of jskfan


Thanks Arnold..
The error on the screenshot previously pasted does not show on certain computers now... it shows only on one computer...

I will test that at work and see...

Thanks for your Help