Prevent first process from closing after firefox starts
I see that when I start Firefox, the firefox.exe process appears with ID 0001 (for example). Then 0002 and 0003 appear, and so on, after which the Firefox window is displayed. But process 0001 closes.
The problem is that a system service like UE-V monitors the process and binds to it. This service synchronizes user directories. By intercepting the process, UE-V pauses it, copies the profile from the server, then lets the process run. Upon the user is closing the program, UE-V see that process is closed and uploaded profile to the server.
Of course, the problem is that the process opens and immediately closes, thereby preventing the ue-v service from working normally. UE-V thinks that process was closed and do not see other Firefox processes.
All I could do was write a C# program that runs, launches Firefox, and watches for processes, once they've finished (all) this program exits as well. I replaced the original firefox.exe file with this program. It turns out something like a launcher.
But I would like to get away from this method (although it has been working for like 2-3 years).
How can I force Firefox not to close the first process?