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)
Re: Saving printer object settings without rebooting
Jim Moe schrieb:[color=blue]
> 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?
>[/color]
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 <os2.h>
#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;
}
Re: Saving printer object settings without rebooting
On Thu, 12 Jul 2007 20:01:40 UTC in comp.os.os2.misc, Jim Moe
<jmm-list.AXSPAMGN@sohnen-moe.com> wrote:
[color=blue]
> 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?[/color]
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
Re: Saving printer object settings without rebooting
On Thu, 12 Jul 2007 13:01:40 -0700, Jim Moe <jmm-list.AXSPAMGN@sohnen-moe.com> wrote:[color=blue]
> 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?[/color]
Maybe SysSaveObject() can do this?
--
Alex Taylor
[url]http://www.cs-club.org/~alex[/url]
Remove hat to reply (reply-to address).
Re: Saving printer object settings without rebooting
Jim Moe wrote:[color=blue]
> Is there a way to save those settings other than rebooting?
>[/color]
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)
Re: Saving printer object settings without rebooting
On Thu, 12 Jul 2007 17:27:30 -0500, Trevor Hemsley
<Trevor.Hemsley@mytrousers.ntlworld.com> wrote:
[color=blue][color=green]
>> 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?[/color]
>
> FM/2 has a utility in it called savedesk that can be used to force a desktop
> save. Try that.[/color]
That will only save the settings of the Desktop, not any other object.
Re: Saving printer object settings without rebooting
On 13 Jul 2007 09:31:01 -0500, Alex Taylor <mail.me@reply.to.address> wrote:
[color=blue]
> On Thu, 12 Jul 2007 13:01:40 -0700, Jim Moe <jmm-list.AXSPAMGN@sohnen-moe.com> wrote:[color=green]
>> 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?[/color]
>
> Maybe SysSaveObject() can do this?[/color]
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.
Re: Saving printer object settings without rebooting
In <slrnf9sm7f.2lv.abuse@news.pr.network>, on 07/18/2007
at 06:16 PM, Paul Ratcliffe <abuse@orac12.clara34.co56.uk78> said:
Hi,
[color=blue][color=green]
>> Maybe SysSaveObject() can do this?[/color][/color]
[color=blue]
>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.[/color]
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 <steve53@earthlink.bogus.net> MR2/ICE 3.00 beta 07pre #10183
eCS/Warp/DIY/14.103a_W4 [url]www.scoug.com[/url] irc.ca.webbnet.info #scoug (Wed 7pm PST)
--------------------------------------------------------------------------------------------
Re: Saving printer object settings without rebooting
Jim Moe wrote:[color=blue]
> Jim Moe wrote:
>[color=green]
>> Is there a way to save those settings other than rebooting?
>>[/color]
>
> 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!
>[/color]
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.