Solved

Printer setting

Posted on 2004-09-14
8
1,759 Views
Last Modified: 2008-02-07
Hello,
I am stuck at the point where I have to make clients to reboot their machine in order for them print with separator pages.
I was able to install the printer drivers and printer using "Rundll32 printui.dll,printuientry"; however, I can't make printer to print separator page without rebooting the machine.   If I assign the filename directly into printer's property -> Advanced -> Separator Page, then it works and I don't have to reboot the machine; however, if I assign the value directly to registry by command line or through VB.NET or C#, I have to reboot in order for printer to print a separator page.
My question is, is there a way to assign a separator page and make printer print separator page without rebooting the machine, or is there a way to refresh the registry certain section??

The registry value that I changed were,

Key -> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet 4/4M Plus PS 600]
String Value name -> "Separator File"
String Value Data -> "C:\\WINDOWS\\system32\\pscript.sep"

and,

Key -> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet 4/4M Plus PS 600\DsSpooler]
String Value name -> "printSeparatorFile"
String Value Data -> "C:\\WINDOWS\\system32\\pscript.sep"

but then, I also notice the "changeID" (a binary value) which locates in both "4M Plus PS 600" key and "DsSpooler" key, changes whenever I change some setting in Control Panel -> Printers -> HP LaserJet 4/4M Plus PS 600.
And so, I was wondering if this "changeID" was to keep tracks of changes and refresh printer setting somehow.   The only problem is that it looks though the "changeID" value is randomly generated and I wasn't able to find the pattern.  Also, I have this strong feeling that this seperator file is changed through "rundll32 printui.dll,PrintUIEntry".
But how?

Any thoughts?

Thank you again,

Evan
0
Comment
Question by:evansong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 38

Expert Comment

by:hdhondt
ID: 12079789
Registry settings should be active immediately, without rebooting. Hence you must be doing something wrong when you write the change, so that the change isn't actually writen into the registry until the application quits or the PC shuts down.
0
 

Author Comment

by:evansong
ID: 12089075
hi hdhondt,

I wasn't doing anything wrong.. because after running the application, when I checked the registry, I found the changes in the registry.  
Key -> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet 4/4M Plus PS 600]
String Value name -> "Separator File"
String Value Data -> "C:\\WINDOWS\\system32\\pscript.sep"

Key -> [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\HP LaserJet 4/4M Plus PS 600\DsSpooler]
String Value name -> "printSeparatorFile"
String Value Data -> "C:\\WINDOWS\\system32\\pscript.sep"

These two values were added properly, but it didn't show up in the Printer's property -> Advanced -> Separator Page....
It shows up when I reboot the machine.  And if what you said is true, then the separator file should take affect immediately, but it's not.  I think it has to do with "chageID" (a binary value).   Do you have any clue what it is and how to change it to make printer prints separator page that I specified through registry??

Also, do you know how to show total page number show up in the separator page (POSTSCRIPT)??
I tried so many different combination but can not find a way to print total page number the person is printing.
For instace,
name is (@N)
jobid is (@I)
date (@D)
time (@T)

What is code for total page?

Thank you hdhondt :)
0
 
LVL 38

Expert Comment

by:hdhondt
ID: 12091277
There is no separator page code for the number of pages. However it is possible to send PostScript commands to the printer to do that, and even to print them on a page. This is not a trivial question though - unless you're a PostScript expert, which I'm not.

I'll give it some thought...
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 

Author Comment

by:evansong
ID: 12093768
Hi hdHondt,

well, I figured the problem out.  All I had to do was restart the printing service and the computer refresh the registry information and set the separator page without rebooting the machine :)

However, I would really like to print "TOTAL PAGE" count into separator page.  And..

http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/AdminTips/Network/SharedprinterseparatorpageforWindows2000andWindowsXP.html

this site shows some codes; however, no indication of whether how to print total page number into the separator page.

Evan
0
 
LVL 38

Expert Comment

by:hdhondt
ID: 12094535
As I said before, there is no separator code for the number of pages printer. The separator page just sends data to the printer, hence it cannot know anything from the printer. However, it is possible to send PostScript commands to the printer as part of sysprint.sep so the printer prints the page count.

However, this is very much a different question to the original one, and I suggest you close this question and ask for a refund of your points as you solved the question yourself. Then start a new question about printing the total pagecount on the separator page.
0
 

Author Comment

by:evansong
ID: 12097402
Ok.. i will post a new post and close this question.
The answer to my problem was solved by the following:

1) execute command line, net stop spooler
2) and then modified the print registry
3) and when I finish editing registry, I executed command line, net start spooler

The modified version of registry was taken affect without rebooting the machine.

Thank you again for your help hdhondt.  :)  I hope to see you again from new post!

Evan
0
 
LVL 2

Accepted Solution

by:
Lunchy earned 0 total points
ID: 12138134
Closed, 500 points refunded.
Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to solve seemingly unsolvable printer issues. Users sometimes run into printing issues where all the normal steps do not seem to work. Well the steps below can show users how to take one extra step beyond the normal steps needed to remove old…
When I recently replaced my image transfer kit on my office HP color laserjet 5550dn printer, I had a slight problem.  The left bracket that holds the transfer kit got stuck in the upright locked position instead of being at a 45 degree angle facing…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question