Thanks for the info, but the issue is not on the installation, this has been configured as such and works, as I to have a Global condition set up for to detect if a user is logged in. The issue I am having is with the application that this is superseding. I need the old application to be uninstalled, again I set up a global condition to detect if a user is logged on or not. This determine whether or not the user gets a pop up, however, uninstalls seem to ignore all requirements, and ignore the User Experience tab. So when it goes to remove the old application it is stopping at the top priority deployment, I was curious if there was a way around this, or if I could force Uninstall deployments to check requirements. If it can't be done, I wonder if it could be done with a custom script for the application detection method, right now it is just using the MSI code to detect whether it is installed. I wonder if I write a custom script that checks for the MSI and checks to see if someone is logged in for the Logged in deployment, and another script to check for the MSI and to see if someone is logged off, for the logged off deployment. This way when it checks to see which deployment is installed, my custom script will be factoring in if a user is logged in, I could only use this application for uninstall purposes, but it shouldn't matter as I will not be deploying this version anyway. Would this cause any negative side effects? Mark From: [email protected] Date: Sat, 23 May 2015 00:32:57 -0400 Subject: Re: [mssms] Multiple deployment types for removing software To: [email protected]
As Ryan stated, it is stopping at the first Deployment Type because there is nothing in your "requirements" section that says it SHOULDN'T be deploying the first Deployment Type, so the second Deployment Type is never actually evaluated. I noticed this behavior when I first started working with Applications in CM 2012. For some of our applications, when a user is logged off, I want the app to run uninterrupted, but when they are logged on I want them to see the progress by running I run msiexec.exe /passive. In the old days with Packages, I could use the /passive is both circumstances and just set it to "allow users to interact", and still set it to "run whether user is logged on or not". With Applications, once you set it to run regardless of logon, allowing user interaction is grayed out. It's beyond annoying. I got around this by created two Deployment Types, one Unattended and one Attended with the /passive and /q, respectively. Then I created a Global Condition called "user is logged on" and it uses a Boolean data type with the Powershell expression: [bool] (Get-Process explorer -ea 0) The way it works is that explorer.exe will only be running if there is a user logged into the system. Then, in the Deployment Type > Requirements, I pick the custom condition and set it to true for the Attended DT and false for the unattended DT. Hope this helps. On Fri, May 22, 2015 at 10:55 PM, Ryan <[email protected]> wrote: It is based off of the requirements. So the first deployment type in the priority that meets the requirements is the one that is used. You could do a custom script requirement of "user logged on" to make it switch between the two. On Fri, May 22, 2015 at 2:47 PM, Mark Evers <[email protected]> wrote: I need help with an Application uninstall deployment, I have an old application that I need to remove from my environment for an upgrade(will be using application supersedence). I created a VB.net Visual Basic program that displays my Removal message, checks to see if the application is open, prompts user to close, and after a specified time forces it closed, and then removes the application. I created a single deployment (set this to priority one) with my custom program for the Uninstall command, allowing user interaction, which requires the application to be run only when user is logged in. I wanted to create a second deployment type so user could schedule the removal after hours, when they are not logged in. So I copied the 1st to a second deployment, and modify it, this time just using the msiexe.exe /x {msi code} command to do the uninstall, since the program will not be opened, and set this to only run when no user is logged in, deployment type priority 2. However when I test it, the AppEnforce log says: Waiting for user logon. App requires a user to be logged on and there is no user currently logged on. The deployment type that is running is the logged on deployment, it is not even going to the second deployment type. I have tested both deployment types separately and they run as expected. Is this common behavior for uninstall deployments, it will only use the 1st deployment that matches the detection, and ignore all others, even if\when the run conditions do not match the current logged in status? I know uninstalls ignores any requirements I have set. Is there another way I can have two uninstall deployments base on logged on behavior?
