: If you see an error like "The disk image could not be opened," the file may be corrupted or didn't download fully. Try downloading it again.

Select > Extract files... to choose a destination folder.

You can now delete the original .dmg file from your Downloads folder. It has served its purpose.

– This is the crucial step. Inside the DMG window, you’ll see an icon for the .app file. Drag that icon onto the folder shortcut (or directly into your Applications folder in a separate Finder window). This copies the program to your system.

If you're implementing this as a feature in a larger application, consider: