Discussion:
[wpkg-users] prompting a user before continuing
Jürgen Depicker
2017-01-02 11:23:23 UTC
Permalink
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: ***@let.be  |  www.let.be


---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Nils Thiele
2017-01-03 09:36:39 UTC
Permalink
Hi,

Why not use wpkg-gp to execute? It is delaying the execution until the
network is up (and also has a timeout function if network is down).

About the confirmation:

You are running the popup as a different user than the one logged on
(admin or system) and i guess that the confirmation would only be
displayed to the user who is executing the script.


For user confirmation before running wpkg may take a look at my client
application for wpkg-gp:

https://github.com/sonicnkt/wpkg-gp-client


Best Regards,

Nils
Post by Jürgen Depicker
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).
--
IT-Support - Fachbereich 09 Kulturgeschichte und Kulturkunde
Universität Hamburg
Flügelbau West, R. 204
Edmund-Siemers-Allee 1
D-20146 Hamburg
Tel.: +49-40-42838-3024
Email: ***@uni-hamburg.de

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Tim Sheets
2017-01-03 14:56:25 UTC
Permalink
You can use the msg * to pop a message to all sessions.

Example:
msg * /TIME:900 Your computer will restart in 15 minutes from the time on the top of this message box.

Tim Sheets
Systems Administrator

-----Original Message-----
From: wpkg-users [mailto:wpkg-users-***@lists.wpkg.org] On Behalf Of Nils Thiele
Sent: Tuesday, January 03, 2017 3:37 AM
To: wpkg-***@lists.wpkg.org
Subject: Re: [wpkg-users] prompting a user before continuing

Hi,

Why not use wpkg-gp to execute? It is delaying the execution until the network is up (and also has a timeout function if network is down).

About the confirmation:

You are running the popup as a different user than the one logged on (admin or system) and i guess that the confirmation would only be displayed to the user who is executing the script.


For user confirmation before running wpkg may take a look at my client application for wpkg-gp:

https://github.com/sonicnkt/wpkg-gp-client


Best Regards,

Nils
Post by Jürgen Depicker
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
http://with-love-from-siberia.blogspot.be/2009/12/msgbox-inputbox-in-j
script.html No popup is visible on the client though... (except from
the one generated by wpkg.js, warning about updates being installed).
--
IT-Support - Fachbereich 09 Kulturgeschichte und Kulturkunde Universität Hamburg Flügelbau West, R. 204 Edmund-Siemers-Allee 1
D-20146 Hamburg
Tel.: +49-40-42838-3024
Email: ***@uni-hamburg.de

---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
_______________________________________________
wpkg-users mailing list
wpkg-***@lists.wpkg.org
https://lists.wpkg.org/mailman/listinfo/wpkg-users
---------------------------------
wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
Loading...