Search code examples
node.jsmacosinstallationdmg

Start app on mac os directly after installation


I'd like to know if it is possible to create a dmg file which can be installed by Drag&Drop - and which starts directly after this installation without having to be called manually again.

And if this is possible, I'd like to know whether I can pass arguments to the (nodejs) process which will be started directly after the installation.

I managed to pass parameters to the process when I call it manually after the installation, but I want to run it directly.

Any help will be appreciated!

Thanks!


Solution

  • I solved it: Instead of creating an app and wrapping it into a dmg, I created an app and wrapped it into a pkg. For pkgs it is possible to use postinstall scripts, so I started the application through this script.