Extremely odd issue with printing to shared printer

  • Thread starter Thread starter Matt Brown - nyc
  • Start date Start date
M

Matt Brown - nyc

Hello,

I'm having a very strange issue with a shared printer.

I've changed the driver and the printer on the server, but kept the
same name as a previous printer.


I then run a script (on the client) that stops the spooler, removes
the driver from the registry, restarts the spooler.

I then install the printer using win32_printers.


If I then try to test print to the printer from this client I get the
following error:
- Test page failed to print. Would you like to view the print
troubleshooter for assistance?

I then print a test page to the printer from the server, which
succeeds.

I then print a test page to the printer from the client, which
succeeds.


This makes absolutely no sense to me. FYI: if I don't remove the
driver on the client, I will get the above error perpetually.


Does anyone know why this would be happening and how to avoid it?


Thanks,

Matt
 
After performing a lot of research... I came up with the following
solution:


Useful tools for process:

- Notepad
- regedit
- spreadsheet program
- regjump by sysinternals
- reg (command line registry interface)
- sc (command line service control interface)


...: Problem :..


immediately see:

---------------------------
Printer Properties
---------------------------
Test page failed to print. Would you like to view the print
troubleshooter for assistance?
---------------------------
Yes No
---------------------------


---------------------------
Print Server Properties
---------------------------
Unable to remove Xerox WC M20 Series PCL 6, Intel, Windows 2000 or XP
driver. The specified printer driver is currently in use.
---------------------------
OK
---------------------------



when trying to test print; and simply deleting the printer,
reinstalling the printer, or deleting the driver doesn't work... You
have to do it manually....


...: Solution :..

1) delete print device
2) locate and record the driver files
3) stop spooler
4) delete driver files manually (creating a batch to delete is a lot
easier than manually typing or selecting the 30 or so files)
5) delete registry entries
6) reboot / start spooler
7) Confirm deletion of driver
8) reinstall printer from server


It is expected that you are performing these tasks using a local
administrator.


1) Go to Printers and Faxes and delete the problem print device

2) In Printers and Faxes> file> Server properties
Go to Drivers tab
select offending driver
click properties
note driver path

go to the driver registry key ex:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments
\Windows NT x86\Drivers\Version-3\[Complete name of driver]
(eg: Xerox WC M20 Series PCL 6)

look at the values for the following:
-Dependant Files
-Driver File
-Data File
-Configuration File

You can open all of these, copy and paste the values into a single
text file for later manipulation.


3) start>run> cmd /k sc stop spooler

4) Creating a batch to move files:

-Open a new spreadsheet, take the contents of the text file created in
step 2 and paste them into the B column
-Type the string move into column A. With this cell highlighted,
click and drag to populate all cells in column A with move.
-Type the string c:\temp\baddriver\ into column C. With this cell
highlighted, click and drag to populate all cells in column C with c:
\temp\baddriver\.
-Select all of the data and copy.
-Open notepad, paste the data.
-Highlight the space/tab in between the first move and the filename.
Copy.
-Go to replace (CTRL-H), paste the character you've copied (it will be
a tab and show up as a un-displayable character/square) into the "Find
what."
-Go to "Replace with" and hit a space. Hit Alt+A or click Replace
All.
-Go to the first line of the file and copy and paste the following:

c:
mkdir c:\temp
mkdir c:\temp\baddriver

cd [paste the path to the drivers files you found in step 2 here]


-Save it as move_baddriver_files.bat


5) You can either delete the registry keys manually or write a batch
file:

reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print
\Environments\Windows NT x86\Drivers\Version-3\[Complete name of
driver]" /f
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print
\Environments\Windows NT x86\Drivers\Version-3\[Complete name of
driver]" /f
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\Print
\Environments\Windows NT x86\Drivers\Version-3\[Complete name of
driver]" /f


6) You may need to restart the computer, or if you can't, try to
simply restart the spooler (it should have been stopped throughout
this entire process)
start>run> cmd /k sc start spooler


7) confirm deletion by in Printers and Faxes> file> Server properties,
go to Drivers tab.

8) Add the printer from the server as you would.



This should do it.


Peace,

Matt
 
corrections:
-in "You can open all of these, copy and paste the values into a
single text file for later manipulation." the word "values" should be
"data." so: in "You can open all of these, copy and paste the data [of
each of the listed values] into a single text file for later
manipulation."
-obviously... run the bat in step 4 at step 4



After performing a lot of research... I came up with the following
solution:

Useful tools for process:

- Notepad
- regedit
- spreadsheet program
- regjump by sysinternals
- reg (command line registry interface)
- sc (command line service control interface)

..: Problem :..

immediately see:

---------------------------
Printer Properties
---------------------------
Test page failed to print. Would you like to view the print
troubleshooter for assistance?
---------------------------
Yes   No
---------------------------

---------------------------
Print Server Properties
---------------------------
Unable to remove Xerox WC M20 Series PCL 6, Intel, Windows 2000 or XP
driver. The specified printer driver is currently in use.
---------------------------
OK
---------------------------

when trying to test print; and simply deleting the printer,
reinstalling the printer, or deleting the driver doesn't work...  You
have to do it manually....

..: Solution :..

1) delete print device
2) locate and record the driver files
3) stop spooler
4) delete driver files manually (creating a batch to delete is a lot
easier than manually typing or selecting the 30 or so files)
5) delete registry entries
6) reboot / start spooler
7) Confirm deletion of driver
8) reinstall printer from server

It is expected that you are performing these tasks using a local
administrator.

1) Go to Printers and Faxes and delete the problem print device

2) In Printers and Faxes> file> Server properties
Go to Drivers tab
select offending driver
click properties
note driver path

go to the driver registry key ex:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments
\Windows NT x86\Drivers\Version-3\[Complete name of driver]
(eg: Xerox WC M20 Series PCL 6)

look at the values for the following:
-Dependant Files
-Driver File
-Data File
-Configuration File

You can open all of these, copy and paste the values into a single
text file for later manipulation.

3) start>run> cmd /k sc stop spooler

4) Creating a batch to move files:

-Open a new spreadsheet, take the contents of the text file created in
step 2 and paste them into the B column
-Type the string move into column A.  With this cell highlighted,
click and drag to populate all cells in column A with move.
-Type the string c:\temp\baddriver\ into column C. With this cell
highlighted, click and drag to populate all cells in column C with c:
\temp\baddriver\.
-Select all of the data and copy.
-Open notepad, paste the data.
-Highlight the space/tab in between the first move and the filename.
Copy.
-Go to replace (CTRL-H), paste the character you've copied (it will be
a tab and show up as a un-displayable character/square) into the "Find
what."
-Go to "Replace with" and hit a space.  Hit Alt+A or click Replace
All.
-Go to the first line of the file and copy and paste the following:

c:
mkdir c:\temp
mkdir c:\temp\baddriver

cd [paste the path to the drivers files you found in step 2 here]

-Save it as move_baddriver_files.bat

5) You can either delete the registry keys manually or write a batch
file:

reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print
\Environments\Windows NT x86\Drivers\Version-3\[Complete name of
driver]" /f
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print
\Environments\Windows NT x86\Drivers\Version-3\[Complete name of
driver]" /f
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\Print
\Environments\Windows NT x86\Drivers\Version-3\[Complete name of
driver]" /f

6) You may need to restart the computer, or if you can't, try to
simply restart the spooler (it should have been stopped throughout
this entire process)
start>run> cmd /k sc start spooler

7) confirm deletion by in Printers and Faxes> file> Server properties,
go to Drivers tab.

8) Add the printer from the server as you would.

This should do it.

Peace,

Matt

I'm having a very strange issue with a shared printer.
I've changed the driver and the printer on the server, but kept the
same name as a previous printer.
I then run a script (on the client) that stops the spooler, removes
the driver from the registry, restarts the spooler.
I then install the printer using win32_printers.
If I then try to test print to the printer from this client I get the
following error:
- Test page failed to print. Would you like to view the print
troubleshooter for assistance?
I then print a test page to the printer from the server, which
succeeds.
I then print a test page to the printer from the client, which
succeeds.
This makes absolutely no sense to me.  FYI: if I don't remove the
driver on the client, I will get the above error perpetually.
Does anyone know why this would be happening and how to avoid it?

Matt
 
Back
Top