[wpkg-users] Fwd: WPKG - issues

Alex Owen r.alex.owen at gmail.com
Thu Apr 5 00:51:42 CEST 2007


Opps... forgot to reply all again!

---------- Forwarded message ----------
From: Alex Owen <r.alex.owen at gmail.com>
Date: 04-Apr-2007 23:47
Subject: Re: [wpkg-users] WPKG - issues
To: Tomasz Chmielewski <mangoo at wpkg.org>


On 04/04/07, Tomasz Chmielewski <mangoo at wpkg.org> wrote:
> Alex Owen schrieb:
> > My settings.xml contains:
> >
> > <parameters> /synchronize /rebootcmd:"shutdown.exe -r -t 20" </parameters>
> >
> > But this does not work when the delayed logon is also active!
> > (windowsXP)
> > the shutdown.exe complains that the "device is not ready" or something
> > similar.
> > looking at win32 API docs the solution is to try again in a bit. I
> > tried to make a batch script to repeatedly run the shutdown command
> > but that did not work either.
> >
> >
> > I have tried many thinngs today and think I have come to a solution
> > based on reading this:
> > http://wwwthep.physik.uni-mainz.de/~frink/newgina_pre09/readme.html
> >
> > The idea is this:
> > (1) make wpkg.js set a registery key if it needs a reboot
> > (2) write a GINA stub that intercepts WlxDisplaySASNotice() and if the
> > wpkg-needs-reboot registery key is set then clear wpkg-needs-reboot
> > key and initiate a reboot.
> >
> > Of course I have no proof that this will work but I think that the
> > system is effectivly "up" when
> > WlxDisplaySASNotice() is called.
> >
> > The normal MSGINA can also shut the system down so I don't see why
> > this stub couldn't either.
>
> The problem is, the system thinks it is "still booting" when delayed
> logon is active - in such case, Windows won't reboot.
I agree with this analysis. (*)

> The solution would be to learn WPKG Installer to read exit codes from
> wpkg.js (and, also from "execute before/after"); if we have a specified
> exit code, "WPKG service" should schedule a restart as soon as it's
> possible.
>
> I think reading an exit code is a cleaner and better solution than
> setting/reading/cleaning some registry values.
>
> Of course, that's the concept, the code does not exist yet (and everyone
> is welcome to contribute).
Yes I agree that checkinf the exit code of wpkg.js would be cleaner.
However are we sure that the logon delay prog runs late enough to
schedule a reboot [see (*) above].

I was thinking that maybe the post wpkg.js script may run late enough
to schedule a shutdown but I  see nothing in the source to indicate
that it runs in a condition different from wpkg.js.

But maybe a direct win32 API call fomr the delay login prog would
schedule a shutdown???

> Also, we don't want to use any GINAs - this was a conscious decision
> wwhen we started to implement the "logon delay" - things tend to get
> complicated more than needed then.
I agree that things are best kept simple!!!
However hooking WlxDisplaySASNotice() _MAY_ be the earliest place to
that one is able to request a reboot.

An alternative is to have a RunOnce or Run registery key to run a prog
at user login which checks a flag left by wpkg.js and reboots if
needed. This  however is sub-optimal as the system would sit in a
state needing a reboot and would wait untill a user logs in untill it
reboots.


If I find time tomorrow I will try to install Visual C++ express +
Windows Platform SDK to get a compile environment and investigate the
current wpkg-installer code some more.

Bye for now
Alex Owen






_______________________________________________
wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list