macosshellpackagemaker

Adding .app to dock using package maker


I would like to create a package using package maker that when installed adds the .app to the dock.I have tried the below code which works fine when executed from the terminal:-

Apples-MacBook-Pro-2:~ apple$ defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/MyApp.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
Apples-MacBook-Pro-2:~ apple$ killall Dock

I want to add the above script on the package maker.Can anybody please tell me how to do so? Thanks a lot!


Solution

  • You can use a tool known as "packages" it comes with pre installed script with an option of adding the software to dock.

    use the following link for packages