Re: [wpkg-users] [Bug 171] User notification does not work on Vista

2009-09-07 Thread Robin Roevens
Hi

I don't really see the big difference between calling an external tool 
like psshutdown instead of the default windows shutdown command as wpkg.js 
can do now, and an external tool for user notification instead of the 
default windows NET or MSG command. But indeed due to the nature of such a 
notification binary (displaying user notification) user credentials could 
become a problem..
And WPKG client indeed already provides the user-notification 
functionality... So maybe it is a posibility to turn my idea the other way 
around by extending WPKG client so that it can be 'activated' by a script 
instead of only at preconfigured pre-logon or post-logoff times..

The way I see this is then:
- WPKG client is installed as a service (like it is now), configured to 
only wake up on manual activation
- A user is logged on, and for example, the GPO logon script  (or a 
scheduled task, or ) calls WPKGclient.exe /activate
- WPKGclient.exe then sends a signal to the resident WPKGclient service 
which then starts its job by displaying user notification and executing 
wpkg.js
For this purpose of course the WPKGclient notification functionality 
should be a bit extended too in a way similar as I described earlier so 
users can work while WPKG is doing it's job..

This way you don't have to touch the .js code + people wanting extensive 
user notification can have it by using WPKG client without being bound to 
pre-log-on or post-log-off operations (which also still should be a 
possibility of WPKGclient). And people who don't want it, can still keep 
using wpkg.js without WPKG client as they do now..Everybody happy ;-)

Anyway still a suggestion tough...:-)

Best Regards

Robin

Rainer Meier r.me...@wpkg.org wrote on 04.09.2009 17:31:50:

 From:
 
 Rainer Meier r.me...@wpkg.org
 
 To:
 
 Robin Roevens robin.roev...@cocks.be
 
 Cc:
 
 wpkg-users@lists.wpkg.org
 
 Date:
 
 04.09.2009 17:32
 
 Subject:
 
 Re: [wpkg-users] [Bug 171] User notification does not work on Vista
 
 Hi Robin,
 
 Robin Roevens wrote:
  Maybe it is a good idea to supply a small executable in the tools
  directory that will be used for notifying the user?
  That way you are not dependent on a Microsoft ways of notifying users,
  thus not windows-version dependent. (except for binary incompatible
  windows versions :-))
  Something in style of the current WPKGclient notification, or like
  WPKGmessage
  (http://www.gig-mbh.de/edv/software/wpkgtools/wpkg-message-english.htm
)
  
  This tool can then give current state information about the wpkg
  process, and disappear when the process is done..
  And you can then also put an option in that tool so that the user can
  press a button to let it dissapear into the systray or so, so it is 
not
  in the way of the working user, but the user is still aware that the
  process is still running..until that tray icon disappears. (maybe it 
is
  best to have an animated tray icon then). And the user can check on 
the
  current state by clicking on that tray icon which then displays the 
tool
  again..
 
 Currently WPKG client is using this approach. In general I don't think 
that it
 would be a good idea having wpkg.js (which is invoked by different user
 credentials in different environments) invoking such a binary. WPKG 
 is designed
 to run using only built-in Windows facilities. No additional binaries or
 libraries needed. The notification using net send was introduced 
 years ago in
 WPKG 0.x and was just kept there. It has many limitations but provides 
basic
 notification which can be useful in some situations. It at no means 
useful to
 block the user to do actions or to log in while WPKG is running.
 
 I think it's the right way that WPKG client as a service tries to 
 reach these goals:
 - Implement logon delay
 - Notify user while preventing user actions
 
 We already know that especially on Windows Vista and newer we have 
 troubles with
 the logon delay feature. Including such actions into wpkg.js seems not 
to be a
 good idea; I prefer wpkg.js to be as stable and reliable as possible
 and leaving
 such fancy stuff up to tools invoking wpkg.js. In case of failure or 
changes
 on OS/System level there is much less impact and lots of possibilities 
for
 work-around to get the core working.
 
 br,
 Rainer

--
Denk aan het milieu - is het nodig deze mail te printen?

** Email Disclaimer:
** This e-mail and the information it contains may be confidential, legally 
privileged and protected by law.  Access by the intended recipient only is 
authorised.  If you are not the intended recipient, please notify the sender 
immediately and delete this e-mail from your system.  Any review, distribution, 
reproduction, publication or other use of this e-mail by persons or entities 
other than the intended recipient is prohibited.

-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users

Re: [wpkg-users] [Bug 171] User notification does not work on Vista

2009-09-07 Thread Pendl Stefan

 --- Comment #4 from Rainer Meier r.me...@wpkg.org
 2009-09-07 10:57:26 ---
 Very nice... what a crap...

 Actually the quotes for the echo command are not required.
 If you use them
 they will be passed to msg.exe and appear as a part of the
 piped characters.

 Moreover the solution has some issues too. Using pipes
 requires executing
 %COMSPEC% so I've tried %COMSPEC% /c echo message | msg.exe
 but this mangles
 UTF-8 characters (which is very important since WPKG supports
 UTF-8 characters
 in message strings and lots of non-english strings include non CP850
 characters.

 I've tried %COMSPEC% /u /c echo message | msg.exe too which
 is supposed to
 forward pipe output as unicode. But it still garbled unicode
 characters.

 Then I've tried %COMSPEC% /u /c chcp 65001  echo message |
 msg.exe where
 chcp is supposed to set cmd into UTF-8 mode. But it did not
 work either.

 So currently I don't know how to pipe unicode characters
 correctly to msg.exe.
 Maybe msg.exe does not correctly accept unicode characters via STDIN.

 So unless somebody finds a work-around for this problem we
 stick to 256
 characters in msg mode.


Redirect the input from a file:

Msg.exe MyText.txt

---
Stefan
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] [Bug 171] User notification does not work on Vista

2009-09-07 Thread Rainer Meier
Hi Stefan,

 Redirect the input from a file:
 
 Msg.exe MyText.txt

WPKG does not use any temporary files. I will not start using such work-arounds
and hacks just for a feature which is very rarely used. Especially since longer
messages than 256 characters are also not very user friendly (who is reading
dialog boxes with such a huge amount of text anyway?).

Using a temporary file would involve checking available space to write to,
writing a temporary file, sending the message and then cleaning up the system. I
really hate temporary files and applications needing them. So I do not plan to
go this way just to work around a stupid limitation/bug done by Microsoft.

So this is not an option to me.



br,
Rainer
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] [Bug 171] User notification does not work on Vista

2009-09-04 Thread Rainer Meier
Hi Robin,

Robin Roevens wrote:
 Maybe it is a good idea to supply a small executable in the tools
 directory that will be used for notifying the user?
 That way you are not dependent on a Microsoft ways of notifying users,
 thus not windows-version dependent. (except for binary incompatible
 windows versions :-))
 Something in style of the current WPKGclient notification, or like
 WPKGmessage
 (http://www.gig-mbh.de/edv/software/wpkgtools/wpkg-message-english.htm)
 
 This tool can then give current state information about the wpkg
 process, and disappear when the process is done..
 And you can then also put an option in that tool so that the user can
 press a button to let it dissapear into the systray or so, so it is not
 in the way of the working user, but the user is still aware that the
 process is still running..until that tray icon disappears. (maybe it is
 best to have an animated tray icon then). And the user can check on the
 current state by clicking on that tray icon which then displays the tool
 again..

Currently WPKG client is using this approach. In general I don't think that it
would be a good idea having wpkg.js (which is invoked by different user
credentials in different environments) invoking such a binary. WPKG is designed
to run using only built-in Windows facilities. No additional binaries or
libraries needed. The notification using net send was introduced years ago in
WPKG 0.x and was just kept there. It has many limitations but provides basic
notification which can be useful in some situations. It at no means useful to
block the user to do actions or to log in while WPKG is running.

I think it's the right way that WPKG client as a service tries to reach these 
goals:
- Implement logon delay
- Notify user while preventing user actions

We already know that especially on Windows Vista and newer we have troubles with
the logon delay feature. Including such actions into wpkg.js seems not to be a
good idea; I prefer wpkg.js to be as stable and reliable as possible and leaving
such fancy stuff up to tools invoking wpkg.js. In case of failure or changes
on OS/System level there is much less impact and lots of possibilities for
work-around to get the core working.

br,
Rainer
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] [Bug 171] User notification does not work on Vista

2009-09-04 Thread mscdex
On 9/4/09, Rainer Meier r.me...@wpkg.org wrote:


 We already know that especially on Windows Vista and newer we have troubles
 with
 the logon delay feature. Including such actions into wpkg.js seems not to
 be a
 good idea; I prefer wpkg.js to be as stable and reliable as possible and
 leaving
 such fancy stuff up to tools invoking wpkg.js. In case of failure or
 changes
 on OS/System level there is much less impact and lots of possibilities for
 work-around to get the core working.


What about implementing some sort of an event-hook notification
functionality where wpkg.js could call functions located in separate JS
file(s) (if available), so that custom solutions could be used. For example,
when wpkg.js detects that changes (whether installation, upgrades, or
removal) need to be made to the system, it could call the appropriate
pre-determined function in the external JS file. This external JS function
could then perform any kind of action, including using a custom message
solution to let the user know what's going on. If none of these event hook
external JS files are found or the callback functions themselves are not
found, then wpkg.js would just continue on as normal.
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] [Bug 171] User notification does not work on Vista

2009-09-04 Thread Rainer Meier
Hi,

mscdex wrote:
 What about implementing some sort of an event-hook notification
 functionality where wpkg.js could call functions located in separate JS
 file(s) (if available), so that custom solutions could be used. For
 example, when wpkg.js detects that changes (whether installation,
 upgrades, or removal) need to be made to the system, it could call the
 appropriate pre-determined function in the external JS file. This
 external JS function could then perform any kind of action, including
 using a custom message solution to let the user know what's going on. If
 none of these event hook external JS files are found or the callback
 functions themselves are not found, then wpkg.js would just continue on
 as normal.

Something which seems to be ignored quite often is that wpkg.js is based on
JScript which is very limited and even based on an implementation by Microsoft
which includes quite a lot of bugs which need special treatment or work-around.

Another reason not to put too much into the core wpkg.js is the fact that each
new feature or extension point increases testing effort. The result wil be
that the code gets unmaintainable and each change can easily break something
unintentionally. I've experienced exactly this with many applications I have
been in touch with. The only way to prevent this is to keep the requirements
slim. At the moment WPKG has some interfaces which can help doing similar
things. On one side applications can wrap wpkg.js execution and track its
actions (e.g. by parsing the output when using /sendStatus). In some cases even
using a package definition provides an interface. For example a package which is
executed at the beginning can of course call any program (e.g. one which deals
with logon delay). It's also possible to execute packages only if there was a
change done to the system so such a package could be used to call any
application/interface you like to (external JS/exe/whatever).

The user notification feature was never meant to be a generic interface. It was
rather designed to send some heartbeat to the user.

If somebody would like to call any non-officially supported notification
application they might be added to the notifyUserStart(), notifyUserStop()
and/or notifyUserFail() functions. As soon as we have a tool available which
needs to be called by this functions I might re-think about such an interface
like checking for wpkg-root\tools\notify[Start|Stop|Fail].cmd and execute it
if it exists. But until then this would just add the risk of increased failure
rate at customer site. With such scripts we might encounter even more failures
due to the well-known broken STDOUT/STDERR flusing in WSH.
So let's discuss about such interfaces again as soon as we have some toolset
which requires it. The current WPKG client implementation does not rely on such
interfaces.

br,
Rainer
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users