For the Java version of Minecraft, you can check the location of the downloaded game's executable file using AppData on Windows.
For macOS operating systems, to find the exe file, open a Finder window and enter ~/Library/Application Support/minecraft.
Any executable file can be launched when activated by double clicking. However, when you do not double-click on the file, it can still run automatically thanks to the Windows Registry, such as when Windows starts.
Therefore, exe files can run automatically by creating a copy and pointing the autostart registry key there. Another way is to drop a copy or shortcut into the Startup section because this is where all the files that will launch as soon as Windows starts are stored.
In addition, there are a number of other agents that can make exe files run automatically on the computer such as AutoPlay and AutoRun features that run in Windows when connections are made, often when connecting to USB.
Malicious software can be hidden in the device's firmware when connected to a computer. Therefore, you should not rely too much on USBs found somewhere or donated USBs if you do not want to take unnecessary risks.
An exe file is a common file type like other types of data files. Therefore, it also has the potential risk of viruses and malware installed by bad guys. In fact, most of these executable files are safe to launch software installation.
Files with the exe extension are all programs that have been translated into machine code. So whether it is malicious or not will depend on the code contained in it.
Above is all the knowledge that provides information about what an exe file is, how to use it, how to open the file as well as how to package programs into exe files so you can understand better. Always be careful when downloading and activating exe files from Internet sources and via email inbox to avoid infection of viruses and malware on your computer.