How can I know how my app was launched on Mac OS? - macos

I've got a problem, and have been looking for a solution for a long time.
I made a application which has an option which will launch the app automatically when the system starts using Launch Services.
If application is launched by the user (ie. opening the .app) I want to do something.
If application is launch by Launch Services when the system starts I want to do another thing.
So I need to know how the app was launched: by the System (Launch Services loading the app when the computer turns on) or User (User opening the .app in the Finder).
How can I get this information?
Any suggestions are weclome.
prethanks.

Related

Is there a way to trick GUI applications in docker to think their window loaded?

I try to run an windows 10 application inside a windows servercore container.
The app can run without user input via COM-Interface (and without visible GUI), but it seems that it needs to load a hidden window in the background. When I start it on docker, the application log file indicates that it's stuck on starting this window.
Is there a way to make the app assume it successfully loaded the window?
All information I found so far was about users who want to see the GUI or about Linux/Windows combinations. None of that helped me.

Launch my application before the Windows logon screen

In a personal project, I want to display my application before (or above) the Windows Logon, ie just before entering the Windows password.
The application must "hide" the password entry screen. I used to launch an application at Windows startup but this after viewing the Windows desktop.
Is it possible to do this please? Should I create a Windows service that will launch my application?
Thanks for your help
If this is just a personal project on your own machine you could set Windows to autologon and then just run your application like a normal startup shortcut.
A NT service is the only documented way to run code before a user logs on. However, spawning a new process in another session and interacting with the Winlogon desktop and putting yourself on top of LogonUI.exe is going to be a hack.

Why don't some programs appear on the task manager startup tab?

Many applications start at startup, however, some of them do not appear on the task manager startup tab. What is that due to?
Is there any way to do this with a program, for example, spotify?
What do I need to do in order for a program to start at startup, but not showing in the startup applications tab?
Setting it in HKCU/Microsoft/Windows/CurrentVersion/Run doesn't seem to work, as it starts, but still shows on the mentioned tab.
Thank you in advance.
Its mostly a factor of how the program itself is written. If its written to run as a service, or as a System Tray application, or otherwise.
I know there are wrappers for running any exe as a service NSSM being the main one I have experience with (but this is mostly for when there is going to be NO user interaction)
I do not know if there is anything that can allow an application to run in the system tray only, not in the taskbar, if it doesn't support it.
But since Spotify does support running minimized to the tray, it does seem like there are some ways to "start spotify minimized", Spotify or other applications might have command line options or other settings to tell them to start "hidden"

Kiosk application launching another application

I need to implement an update feature for an app that runs in Windows kiosk mode. During an update, the app must close in order to replace its executable, Since closing the app also shuts down Windows, I thought to have a second executable (launcher.exe) which launched my application and never closed. However when I put the second executable in kiosk mode it isn't able to start my app. Can an executable in kiosk mode launch another process?

Popup application under citrix

We are planning to develop an application that will run as a windows service that reads a DB for entries on a timer interval basis. whenever an entry is found the service opens shows a popup in the system try, something like lync or ocs.
My question is whether it is possible to deploy the windows service and the popup application under citrix xen app?
Man thanks
Yes you can do that, but you need to keep in mind how those popups will be consumed by a XenApp user. In particular how is the popup app going to get started?
If your users are using published desktops then you can put your popup app in the startup folder of your users so it will always launch and be running and everything will work fine. However if your users are running published apps then you should have the popup app published and get your users to run this published app.

Resources