Saving printer object settings without rebooting - OS2

This is a discussion on Saving printer object settings without rebooting - OS2 ; Hello, WSeB v4.50 fp3. Whenever changes are made to a printer object, while they are effective, they are not permanent. If the system crashes for any reason, the changes are lost. So far the only way to make those changes ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Saving printer object settings without rebooting

  1. Saving printer object settings without rebooting

    Hello,
    WSeB v4.50 fp3.
    Whenever changes are made to a printer object, while they are effective,
    they are not permanent. If the system crashes for any reason, the changes
    are lost. So far the only way to make those changes persistent is to
    reboot which, of course, is absurd and a real pain for a server.
    Is there a way to save those settings other than rebooting?

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

  2. Re: Saving printer object settings without rebooting

    Jim Moe schrieb:
    > Hello,
    > WSeB v4.50 fp3.
    > Whenever changes are made to a printer object, while they are effective,
    > they are not permanent. If the system crashes for any reason, the changes
    > are lost. So far the only way to make those changes persistent is to
    > reboot which, of course, is absurd and a real pain for a server.
    > Is there a way to save those settings other than rebooting?
    >

    Restart the Workplace Shell. XWorkplace offers such a feature but these
    lines of code will also do (if you want, I can send you executable):


    #define INCL_PM
    #include

    #ifdef __cplusplus
    extern "C" {
    #endif

    BOOL APIENTRY WinRestartWorkplace(VOID);

    #ifdef __cplusplus
    }
    #endif


    int main(int argc,char *argv[])
    {
    HAB hab;
    HMQ hmq;
    BOOL frc;

    hab = WinInitialize(0);
    hmq = WinCreateMsgQueue(hab,0);
    WinCancelShutdown(hmq,TRUE);

    frc = WinRestartWorkplace();

    WinDestroyMsgQueue(hmq);
    WinTerminate(hab);

    return 0;
    }

  3. Re: Saving printer object settings without rebooting

    On Thu, 12 Jul 2007 20:01:40 UTC in comp.os.os2.misc, Jim Moe
    wrote:

    > Hello,
    > WSeB v4.50 fp3.
    > Whenever changes are made to a printer object, while they are effective,
    > they are not permanent. If the system crashes for any reason, the changes
    > are lost. So far the only way to make those changes persistent is to
    > reboot which, of course, is absurd and a real pain for a server.
    > Is there a way to save those settings other than rebooting?


    FM/2 has a utility in it called savedesk that can be used to force a desktop
    save. Try that.

    --
    Trevor Hemsley, Brighton, UK
    Trevor dot Hemsley at ntlworld dot com

  4. Re: Saving printer object settings without rebooting

    On Thu, 12 Jul 2007 13:01:40 -0700, Jim Moe wrote:
    > WSeB v4.50 fp3.
    > Whenever changes are made to a printer object, while they are effective,
    > they are not permanent. If the system crashes for any reason, the changes
    > are lost. So far the only way to make those changes persistent is to
    > reboot which, of course, is absurd and a real pain for a server.
    > Is there a way to save those settings other than rebooting?


    Maybe SysSaveObject() can do this?

    --
    Alex Taylor
    http://www.cs-club.org/~alex

    Remove hat to reply (reply-to address).

  5. Re: Saving printer object settings without rebooting

    Jim Moe wrote:
    > Is there a way to save those settings other than rebooting?
    >

    Thanks for the suggestions.
    Knowing that the Desktop must be restarted to save its settings gave me
    the clue I needed. I have eCs ProcMan which offers the option to restart
    the WPS. Such a deal!

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

  6. Re: Saving printer object settings without rebooting

    On Thu, 12 Jul 2007 17:27:30 -0500, Trevor Hemsley
    wrote:

    >> Whenever changes are made to a printer object, while they are effective,
    >> they are not permanent. If the system crashes for any reason, the changes
    >> are lost. So far the only way to make those changes persistent is to
    >> reboot which, of course, is absurd and a real pain for a server.
    >> Is there a way to save those settings other than rebooting?

    >
    > FM/2 has a utility in it called savedesk that can be used to force a desktop
    > save. Try that.


    That will only save the settings of the Desktop, not any other object.

  7. Re: Saving printer object settings without rebooting

    On 13 Jul 2007 09:31:01 -0500, Alex Taylor wrote:

    > On Thu, 12 Jul 2007 13:01:40 -0700, Jim Moe wrote:
    >> WSeB v4.50 fp3.
    >> Whenever changes are made to a printer object, while they are effective,
    >> they are not permanent. If the system crashes for any reason, the changes
    >> are lost. So far the only way to make those changes persistent is to
    >> reboot which, of course, is absurd and a real pain for a server.
    >> Is there a way to save those settings other than rebooting?

    >
    > Maybe SysSaveObject() can do this?


    That should work, although it ought not to be necessary. The WPS ought to
    save the object (the instance data to the OS2.INI file) after a short while
    anyway and the INI files ought to be flushed periodically.

  8. Re: Saving printer object settings without rebooting

    In , on 07/18/2007
    at 06:16 PM, Paul Ratcliffe said:

    Hi,

    >> Maybe SysSaveObject() can do this?


    >That should work, although it ought not to be necessary. The WPS ought to
    >save the object (the instance data to the OS2.INI file) after a short
    >while anyway and the INI files ought to be flushed periodically.


    Agreed. The only caveat I know of is for objects directly on the Desktop.
    These seem to need a proper restart for all their properties to be saved.

    Steven

    --
    --------------------------------------------------------------------------------------------
    Steven Levine MR2/ICE 3.00 beta 07pre #10183
    eCS/Warp/DIY/14.103a_W4 www.scoug.com irc.ca.webbnet.info #scoug (Wed 7pm PST)
    --------------------------------------------------------------------------------------------


  9. Re: Saving printer object settings without rebooting

    Jim Moe wrote:
    > Jim Moe wrote:
    >
    >> Is there a way to save those settings other than rebooting?
    >>

    >
    > Thanks for the suggestions.
    > Knowing that the Desktop must be restarted to save its settings gave me
    > the clue I needed. I have eCs ProcMan which offers the option to restart
    > the WPS. Such a deal!
    >

    Which properties of the printer object are you talking about and how did you set
    them?

    As I see it, there are at least four sets of printer properties:

    1. The print object Properties Notebook reached by right clicking on the printer
    object then selecting Properties. This includes properties such as the port the
    printer is attached to, the driver to be used, the spooler queue parameters,
    whether or not to insert separator pages, etc that apply to all jobs printed via
    this object. One property on these pages that doesn't belong is print to file.
    Properly speaking, it belongs among Job Properties (see below). Some
    applications fix this blunder, others don't. Another related blunder is that
    when you unselect print to file you must reselect the appropriate port. Stupid.

    2. The printer object/driver specific Default Job Properties reached by opening
    the printer properties notebook as above then right clicking on a particular
    driver in the upper panel of the Printer Drivers tab and selecting properties.
    These are stored in OS2SYS.INI under the application name PM_DD_object,driver
    where object identifies the printer object and driver is the name of the
    driver. The key is DefaultJobProperties. I have not been able to find any
    application that actually uses these properties. The only use of them that I
    have found is to initialize the Suggested Default Job Properties (see 3 below)
    when you switch drivers and I think this only happens for certain drivers.

    3. Suggested Default Job Properties reached either by right clicking on the
    printer object then selecting Open As -> Job Properties, or opening the
    printer's properties notebook then selecting Job Properties under the Printer
    Drivers Tab. These are the Job Properties that will be used for the first
    printout of the run in most applications. They are stored in OS2SYS.INI under
    the application name PM_SPOOLER_QUEUE_DDDATA using the physical name of the
    printer object as the key.

    4. Job Properties actually used in a specific instance of printing to a
    particular printer object. Most applications but not all allow Job Properties to
    be set just before actually printing by clicking on a button such as Print
    Options. Some applications used the Suggested Default as the starting point at
    least for the first use of a printer object in each run, others maintain their
    own database. Some applications use the settings entered only for the current
    print out, others remember the settings for the remainder of that invocation of
    the application or until changed. Others remember the settings not only for the
    current invocation but also for subsequent invocations. Still others make the
    changes apply to all applications by updating the Suggested Default Job Properties.

    As Paul Ratcliffe has pointed out, changes to the INI files become permanent
    almost immediately. The only exception are those INI file entries which
    determine which objects appear on the desktop and where they are located. When
    such desktop changes are written to the permanent ini files depends on the
    setting of the Save Desktop Properties check box on the Desktop tab of the
    Desktop Properties notebook.

    As you can see, where and how a particular printer property is modified has a
    lot to do with where and when it applies and how long it persists.

+ Reply to Thread