Question: I would like to know whether there is any way I can run an absolutely unknown executable file without being hacked even if the file contains a lot of malicious code. Is there any program in which I can run it without putting myself in any risk?

Answer: 
> 
> does this guarantee 100 percent protection?
> 
> 
> 

No. Never. Never ever ever ever ever. Period.

100% guarantees simply do not exist in the real world. If you wanted an example of what might get close to 100%:

* Buy a brand new machine. Put it on isolated power. Put the executable on it
* Disconnect it from the network.
* Run the program
* Don't look at the results (you might be tempted to act on them, breaking the 100% guarantee. For all you know the results may hypnotize you into murdering your dog)
* Power the computer down.
* Put the computer in a wood chipper
* Gather then remains, and pour them into a steel foundry a. la. Terminator 2

Now there are things you can do to *mitigate* the risk. Things like running it in a VM (such as the Amazon Web Service Hollowproc recommend) are powerful tools for strongly mitigating the risk. Wiping the harddrive after use is helpful too. However, there is no 100% guarantee.

For an example of this, consider Stuxnet. Stuxnet is infamous for attacking a nuclear enrichment facility *across an airgap*! It wasn't easy, but it did happen.

A better solution would be to not open a file if you can't say *anything* about how safe it is.
Barring NSA-level attacks that alter hard drive firmware and the like, there is a relatively simple and cheap solution. 

* Buy an extra hard drive that include some sort of free "clone" or "migration" software, or a linux "repair" bootable thumb drive.
* Clone your system's hard drive to the new drive then unplug the new drive.
* Unplug the internet source (router, modem, etc) to stop exfiltration
* Install/run your un-trusted EXE as much as needed.
* Reboot and wipe the main hard drive from a bootable thumb drive.
* Clone the copy back to the main box and reboot.

This lets you run code in your normal setup, locally (w/o net), and be rest assured that no harm will come to your machine or data. You could still get hit with a targeted attack that uses something like fan-based exfiltration, but if you're just worried about ransomware, spyware, or a virus, the copy and restore method is very effective.

Use this routine on an extra $100 computer (refurb on newegg or ebay) if the EXE needs internet.