Solved

Printer setting

Posted on 2004-09-14
8
1,721 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
  • 3
  • 3
8 Comments
 
LVL 38

Expert Comment

by:Herman D'Hondt
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:Herman D'Hondt
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

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:Herman D'Hondt
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This seems to be a very common error related to the Samsung printer driver. First, this is the error we're talking about: Log: System Type: Error Event: 7000 Agent Time: 3:37:24 am 22-Apr-09 Event Time: 6:07:24 pm 21-Apr-09 UTC Source: Se…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now