[wpkg-users] prompting a user before continuing
Jürgen Depicker
Jurgen.Depicker at let.be
Mon Jan 2 12:23:23 CET 2017
Hello all,
On my network, wpkg runs before login, but this doesn't always work since W7 and higher don't always initialize networking before showing the login prompt. I haven't found a way to force the behavior I would like (initialize networking first).
To cope with this, I run from time to time a script on my server, which launches wpkg.js using psexec on all machines currently online. For some packages, it is needed to kill the running process before we can start the upgrade. It is understandable that not all users appreciate their browser to be killed (while editing some stuff for example) without giving their approval. I've tried to display a confirm box to ask them to finish their work and push 'OK' so they don't lose work, but this popup doesn't show. What am I doing wrong please?
wpkg.js version 1.3.0
the below is for 64-bit windows systems only
there is an additional check for running processes (based on https://wpkg.org/Script_for_checking_if_a_process_is_already_running ), so what's below only executes if the process is running.
<install cmd="taskkill /F /IM Firefox.exe">
<exit code="any" />
<condition>
<check type="execute" path='%windir%\syswow64\cscript "%SOFTWARE%\confirm.js"' condition="exitcodeequalto" value="0" />
</condition>
</install>
I've been playing with the js code found here as source for my confirm.js: http://with-love-from-siberia.blogspot.be/2009/12/msgbox-inputbox-in-jscript.html
No popup is visible on the client though... (except from the one generated by wpkg.js, warning about updates being installed).
--
Met vriendelijke groeten/Kind regards/Meilleures salutations/Mit freundlichen Grüßen,
Jürgen Depicker | Software Project Manager
L.E.T. NV | Vaartlaan 20 | 9800 Deinze | Belgium
Tel. +32 9 381 87 87 | Fax +32 9 386 92 00
E-mail: Jurgen.Depicker at let.be | www.let.be
More information about the wpkg-users
mailing list