Solved

Printer setting

Posted on 2004-09-14
8
1,737 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: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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you use a Brother DCP 130C or similar Brother printer, at some point you might encounter the following problem: after you change the ink cartridge, the printer displays an "ink empty" message. Sometimes you just need to follow the instructions…
Printers have changed substantially in the last 30 or so years, not just in technical capabilities but in cost and usage as well.  Printers were originally used for interfacing with the operator, not necessarily for printing copy or pictures. In …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

12 Experts available now in Live!

Get 1:1 Help Now