Close VirtualBox if main application is closed?

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
Post Reply
hanman5000
Posts: 2
Joined: Sun Sep 16, 2012 6:44 pm

Close VirtualBox if main application is closed?

Post by hanman5000 » Fri Dec 21, 2018 10:13 pm

Hi,

I have two programs protected with Enigma. Let's call them Program 1 and Program 2.

Program 1 launches Program 2, which is stored in Virtualbox. Then they are both running.

However, if I close Program 1, program 2 stays running.

Is there any way to make it so that Program 2 (the one inside Program 1's VB) will close if Program 1 is closed?

Thanks.

Enigma
Site Admin
Posts: 2413
Joined: Wed Aug 20, 2008 2:24 pm

Re: Close VirtualBox if main application is closed?

Post by Enigma » Mon Dec 24, 2018 10:27 am

Hi, I think that this is going out of protection area.
I can't tell that this is impossible to do from protection side, but it would be rather tricky and complex.

Instead, this is very easy to do from a launcher side:
- when launcher creates a process of virtualized exe, as a result of create process it gets a handle of a new process.
- I believe there is no problems to hook the event when the launcher is being closed
- in the launcher exit event, using child process handle, just close this process, that's all.

Above way has some disadvantage, so there is an another one:
Make two plugins for Enigma,
- 1st plugins is for Launcher, it has to create a mutex object
- 2nd plugin is for virtualized exe (that you have to protect separately, before you add it to launcher), this plugin will check if the mutex object of launcher exists. If launcher is closed, the mutex object is being closed also, plugin returns error when taking a lancher's mutex and exits the application.

Post Reply