SCCM Deployment Types attended and unattended

I wanted to see if anyone can help with this question and I hope i make sense.
I would like to deploy an application where either if a user is logged on or if they are not logged on.
If the user is logged on I want them to see the install, if they are not logged on I want the software to install.

I’m creating the application in SCCM and deploying via Application Deployment method, I have the deployment type in sccm, the User Experience set to Install for system, only when a user is logged on. Allow users to view and interact with the program installation. This works for users that are logged on.

Would I need to create another deployment type in the Application Deployment Method and set the User Experience to install for system only when a user is not logged on? and set the priority to 1 or 2?

Any help will be greatly appreciated.

I still use package deployments (just because I don’t see any reason to change), and I’ve only deployed one so far using this toolkit, but I can tell you it worked just the way you described. The Deploy-Application script monitors the environment and will prompt the user, if there is one, or will proceed with the installation if no one is logged in. I didn’t have to use any command-line switches. I just deployed Deploy-Application.exe

I set my programs to deploy whether or not there is a user logged on, and I allow users to interact with the program.