cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
CyberCitizen
Honored Sweeper
Hi Guys,

Looking to see what everyone else does in regards to an installation notification for packages where the user needs to be out of the application? One of our applications is used heavily by staff, but for the update to occur, I need them to be out of the application.

At present, I am using the below command.

msg.exe /W /TIME:300 * ## INSTALLATION ## APPLICATION NAME is pending install. Please exit and save APPLICATION NAME files before pressing ok to continue. Otherwise this install will force close APPLICATION NAME and install within 5 minutes.

This displays the message to all logged on users of the machine (don't use on terminal server as it goes to all users). Waits 300 seconds (5 min) then continues to the next step which is a taskkill command.

I was wondering if anyone has anything nicer or not so in your face.

I did see a script posted before but it only works when running as logged on user, where as this works for system account or scanning credentials.

11 REPLIES 11
CyberCitizen
Honored Sweeper
Thanks @heybobby1

These are exactly what I was looking for ProcPrompt looks good, I have installed in and will check it out.

Thank you for your assistance.
CyberCitizen wrote:
Thanks @heybobby1

These are exactly what I was looking for ProcPrompt looks good, I have installed in and will check it out.

Thank you for your assistance.


Hey CyberCitizen,

Just wondering if you got this working or came up with another solution? I'm looking at it again, hoping to get something working.
heybobby1 wrote:
Just wondering if you got this working or came up with another solution? I'm looking at it again, hoping to get something working.


Unfortunately no, the issue is they run under the account that is doing the installation eg installing as system or the scanning account, it can't display the message to the logged on user. That is where the MSG command is handy as it can be sent to all users, just looks a little dated.

Best I did was push install messages to the MSG command via text file so I can do larger messages and have it better formatted etc.
CyberCitizen wrote:
heybobby1 wrote:
Just wondering if you got this working or came up with another solution? I'm looking at it again, hoping to get something working.


Unfortunately no, the issue is they run under the account that is doing the installation eg installing as system or the scanning account, it can't display the message to the logged on user. That is where the MSG command is handy as it can be sent to all users, just looks a little dated.

Best I did was push install messages to the MSG command via text file so I can do larger messages and have it better formatted etc.


Thanks for the info. I had a play using psexec and got something working. I've only tested this as an action though as our deployments never get past performing preliminary checks, but that's another issue.

So as an action I called a PowerShell App Deployment Toolkit installer using psexec under the system account and interactive. The interactive bit seems to be the crucial ingredient here, allowing you to show notifications to signed in users while running under the system account. Here's the line I used, if it's of interest.

cmd.exe /K {actionpath}psexec.exe /accepteula \\{smartname} -s -i "\\<server>\<application>\Deploy-Application.exe" -DeploymentType Install -DeployMode Interactive

using a deployment package I think you'd do something more like this:

cmd.exe /c "\\<lansweeperserver>\lansweeper$\psexec.exe /accepteula -s -i \\<server>\<application>\Deploy-Application.exe -DeploymentType Install -DeployMode Interactive"
Ruben1
Engaged Sweeper III
Thanks for the info. But I can't seem to get the "PowerShell App Deployment Toolkit" to work with a dialog for our users.
Did anyone seem to figure it out?
heybobby1
Engaged Sweeper III
Ruben1 wrote:
Did anyone seem to figure it out?


Hi Ruben,

We now use PDQ to deploy apps. Still wrap them in PowerShell App Deployment Toolkit scripts but then deploy them as interactive and with the PDQ deploy step "run as" options set to "Deploy User (Interactive)". The logged on user then sees the close apps prompt.

Hope that helps!

heybobby1
Engaged Sweeper III
Can't say I've used it but I did come across this tool and it's on my to try list!

http://www.cjwdev.co.uk/Software/ProcPrompt/Info.html

* Edit. I think I did try this actually. I wasn't able to deploy as system and interact with the user. I made a feature request at the following link to make {userdomain} and {username} parameters available in deployments. These parameter are already available in actions. You could then create a scheduled task as SYSTEM that runs as the user (so they see it). If this was successful you could then launch the install in the next task step as SYSTEM.

https://www.lansweeper.com/forum/yaf_postst13655_More-action-parameters--variables--in-deployments.aspx#post48084


Anyway, thinking about this I think PowerShellAppDeployToolkit should be able to do the job. http://psappdeploytoolkit.com/

This is a PowerShell wrapper for software deployments with some neat features. One feature is a welcome message with a -CloseApps option. We installed Office 365 2016 with a PSADT wrapper but manually, not with Lansweeper. We used it to close office apps and uninstall all previous versions before beginning the install.

Again not sure if the close apps prompt will run as user when the install runs under SYSTEM but from what I've read there might be a way to get it to work. Here's a thread where someone was able to do it using psexec and the interactive switch running under SYSTEM, and the user was getting the close app notifications: http://psappdeploytoolkit.com/forums/topic/possible-to-run-psad-non-interactive/

If I get some time today I'll try it out.
CyberCitizen
Honored Sweeper
It would be nice if like Microsofts SCCM it could display the install notification and allow them to defer the update / upgrade for a few periods of time, eg 10 min, 30 min, an hour, or 24 hours.

So after the 24 hours they are forced to install etc.
Esben_D
Lansweeper Employee
Lansweeper Employee
Unfortunately, there is nothing nicely built-in. As you mentioned there are some options you can implement with either a command or scripts.

If you have any concrete suggestions of something we could implement, feel free to share it. That way I can add log it for future deployment improvements.