• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Changing a PPD file installed via a .inf file

New Here ,
Oct 25, 2011 Oct 25, 2011

Copy link to clipboard

Copied

I have a .inf file which I use to create printers.  If I change the contents of one of the PPD files referenced by the PPD file, and then re-install the printer, Windows 7 ends up using the original PPD file instead of the new one.

What do I have to do to get Windows to realize that the PPD file needs to be changed?

BTW, after all these years, the PPD strategy still rocks!

TOPICS
Programming

Views

6.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Oct 25, 2011 Oct 25, 2011

Copy link to clipboard

Copied

You write that you reinstall the printer after having modified the PPD file. I assume that you modify a copy of the PPD file in some location other than in the system directory where it is installed, C:\Windows\System32\spool\drivers\x64\3 for 64-bit Windows, for example. However, if you don't delete the printer instance and the .PPD file in that system directory as well as the .BPD file (otherwise matching the .PPD file name), you end up with the symptoms you have noted. What is  the .BPD file you ask? It is a binary interpretation of the .PPD file used by the driver so that it doesn't need to parse the .PPD file every time the driver is invoked. In other words, it is a cache of a processed .PPD file in binary form directly usable by the Windows PostScript driver.

Delete the existing printer instance and both its .PPD and .BPD file prior to trying to reinstall and your changes will work. Another riskier, but workable solution, instead of using the .INF installer hack, is while the driver is not active (no current PostScript print jobs), edit the .PPD file in-place (i.e., in the Windows system directory per above) and simply delete the .BPD file when the editing is done. The next time the PostScript driver is invoked, it will regenerate the .BPD file from the modified .PPD file.

Good luck.

By the way, the PPD file strategy for table-driving the PostScript driver was great for some purposes and also very useful for 1980's and early 1990's printing architectures and hackers love it, but it has quite a few problems that a scheme that directly communicates with the printer device itself would resolve.

          - Dov

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2011 Oct 26, 2011

Copy link to clipboard

Copied

LATEST

Dov,

Thanks for your quick and thoughtful response!

The PPD file I'm installing is packaged in an installer.

The installer _does_ delete the printer instance.  Deleting the PPD and BPD files explicitly sounds extremely dangerous to me.  If anything goes wrong, the spooler will fail to run.

I will research ways to do this via the .inf file.  If you know of any, let me know.

Additional information:

Windows keeps the installer files (.inf, .ppd, etc.) in a directory like this:

C:\Windows\System32\DriverStore\FileRepository\netprint2.inf_x86_neutral_f36895ccb5c3843d

The following actions are not enough to get Windows to create and use a new directory:

* Changing the printer model in the PPD and .inf files.

* Changing the "DriverVer" directive in the .inf file.

Information regarding the print queue and the driver are kept in the Registry:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\HP LaserJet P4515D NPPS]

One of the Registry entries is:

"InfPath"="C:\\Windows\\System32\\DriverStore\\FileRepository\\netprint2.inf_x86_neutral_f36895ccb5c3843d\\netprint2.inf"

I know this is Microsoft rather than Adobe stuff, but any help will be appreciated.

Finally, a server or client can obtain configuration data directly from the printer only if that server or client can access the printer directly.  Otherwise, it needs a configuration (ie. PPD) file.  It would be nice if there were a utility to generate a PPD file from the printer.  Adobe used to have a PostScript program which would do a bunch of the work, but it was not maintained.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines