Weird files on the Desktop after installing programs

androiddesktopgoogle-driveinstall

My "problem" is resolved, but I still want to know what this was, as I am new to Mac OS.

After Installing a few programs, I had weird files/folders with what looked like a hard drive icon appearing on my Desktop (but not appearing in my Desktop folder in Finder). In this case it had to do with Android Studio ("Android Studio 4.0.1") and Google Drive ("Install Backup and Sync from Google"). (I also installed VSCode, but no such thing appeared on the Desktop).

See for yourself on the screenshots, (which were taken after I successfully installed the programs and moved them to my ~/Applications folder.

As I said they did not appear in my Desktop folder in Finder, but they did appear under Locations in finder. I pressed a button looking like an "eject icon" and they disappeared from both Finder locations and my desktop.

I'm just asking all this, because I want to be sure that I made no mistakes during the installation processes.

Best Answer

I assume you're new to Mac ;)

If you get an application from anywhere other than the App Store, it will come neatly wrapped inside a Disk Image file, .dmg.
You double-click it & it will mount just like a real disk or USB stick/SD card on your desktop. It won't show as present in your desktop folder as that's not really where it is. It is mounted at /Volumes in your OS, the same way all your other drives are mounted. Their appearance on the visible desktop is for convenience.
To all intents & purposes a mounted disk image behaves exactly like any other removable drive.

Normally, you open it [or it should open automatically] to show the contents.
Then there are two basic installation methods.
Simple drag & drop - there will be an app & an alias to your Applications folder. You drag the app to the alias & by the 'magic' of Mac aliases, that will copy it to your own Applications folder on your Mac.

Pic of a 'regular' app. Original .dmg file top left, mounted 'disk' right, then below a simple drag & drop installation.

enter image description here

Alternatively, a mounted disk image will contain an actual installer package you need to double-click & run. This is usually for more complex installations that need to ensure specific separate system components all go to the correct places. When you launch one of these you will be presented with an admin permissions dialog to allow the installer to do this.

Pic again with .dmg file to the left, mounted disk to the right & installation window below. Note: some of these more complex apps also need an uninstaller, conveniently packaged in the same .dmg. If an app doesn't have an installer, it shouldn't need an uninstaller.

enter image description here

With either type, once you have finished with it, you can then eject it, just like a real drive - either click in the window, then Cmd ⌘ E or right click & select "eject [name of 'disk']" or from any Finder window, sidebar etc where you can see the eject arrow ⏏︎

Once ejected, then you can either file it away for if you ever need it again, or throw it in the Trash. It's done with.
The app will now run from your regular Applications folder.

Note: Other than special circumstances, apps are not designed to actually run from the mounted disk image. Some will, some will complain, but generally you should avoid it. Run them from Applications after you have copied them over, or installed.