Change the printer driver setting for every user 

 

The Global Printer Driver settings have important implications for administrators to change, create, or restore printer driver settings for every user on the system or create customized settings for certain users. The Global Printer Driver settings are applied for every user once the printer driver is installed. The Global Printer Driver settings will be applied to a User the first time the user uses the printer driver. Once the printer driver is used for the first time, the user will have a unique user specific settings. For an administrator to change a user configurations, the user's current setting must be removed and applied to the new settings. The “Global Setting Samples” demonstrate how to accomplish these tasks.

 

How to change the Global Printer Driver settings is demonstrated in C++, C#, VB.NET, and Delphi programming languages. Please see the “Global Settings” sample applications section.

 

Global Printer Driver settings can be changed programmatically with the following functions:

     

 

Sample call sequence is in C++, to set an output directory for every user.

      // Load settings from the INI file

      BlackIceDEVMODE *pDevmode = CreateDefaultSettings(_T("Black Ice ColorPlus"));

      // Change some settings, e.g. output directory

      SetOutputDirectory(_T("C:\\temp"), pDevmode);

      // Clear user specific settings. Neccessary, so the Global Settings changes will take effect.

      ClearUserSettings(_T("Black Ice ColorPlus"), TRUE);

      // Save global printer settings

      SaveDefaultBlackIceDEVMODE(_T("Black Ice ColorPlus") pDevmode);

      // Free the memory allocated for the BlackIceDEVMODE structure

      ReleaseBlackIceDEVMODE(pDevmode);