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?
>>
>>
>
>


Reply via email to