Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Printer setting

Posted on 2004-09-14
8
Medium Priority
?
1,791 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 39

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 39

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
Industry Leaders: 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!

 

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 39

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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

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…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

885 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