Run game from .exe

What does this do?

Compress all game files into single .exe and runs the game without manual extraction

Step 1: Download WinRAR

I'm sure it'd work with 7-zip but for this tutorial i'm using WinRAR

Step 2:

Highlight all files and right-click then click add to archive;

0OsdTCL.png


Next Change the archive format to 'zip'

PjZcPAp.png


Next, Under archiving options select Create SFX archive.

O31A5ml.png


Next click the advanced tab and select 'SFX Options'

LThgAHK.png


Next in the path to extract field type '%temp%;

yqfbE3G.png


Next, in the update tab select Overwrite all files;

r6JeGC7.png


Next in the modes tab select 'hide all'

p8nIqXw.png


Next in the setup tab in the run after extraction field type 'game.exe'

lMdPdJL.png


Next, (optional) create an Icon for your exe in this example i'm using my website's favicon;

7vlWrhE.png


Finally Click 'ok' twice and the final product should look similar to this;

c36D64p.png


Enjoy.
I'm certainly gonna try this out, very nice dude. 😀

Edit:

Just a thought, but how does the save files work?  I mean, if the app data is held in some temp file, you may need to have a script save into - for example, the user documents folder, in order to have save files working properly.. No?
It actually saves the save file in the temp folder and then retrieves it from the same temp folder.

Although it may conflict if you play many games using the same system. I'll work something out.
No worries.. One could easily use a script (such as the save file systems I wrote) to change the structure of how save files are stored. For example, using my scripts you can have each game save its save files into a subfolder - each game creating a different subfolder. 😀

Either way, this is another brick I can add into my wall of complexity.. Should also help deter 'the hackers' ^_^
It actually saves the save file in the temp folder and then retrieves it from the same temp folder.
Nice idea, but people should be careful if they are using cleaning softwares. It usually deletes the contents of the temp folder, hence they could lose their saves.
I actually have an idea to create a bat file for security measures that disallows the user to open the archive at all and extracts it on its own therefore Eliminating the decryption issue. 100% Game protection. 
I'm curious as to how this would handle game patches.. 

For example, lets say I have a system to download and install new patches onto the game at runtime (which I do), Would I have to save them in a predetermined location, ie, the users documents / similar, or would holding them in the game temp folder be sufficient do you think? 

With regards to the whole bat thing, its not overly hard to just make an actual exe that runs the game.exe.. Call it launcher.exe.. could even have the icon determined from the launcher exe, and then have a script inside your game that checks for command line arguments (I wrote one of those too), then, if a certain argument is specified (which can be done from within the launcher exe), then the game code runs, if not, the game closes.. This would ensure people HAVE to use the launcher to get to play the game. 🙂
I'm curious as to how this would handle game patches.. 

For example, lets say I have a system to download and install new patches onto the game at runtime (which I do), Would I have to save them in a predetermined location, ie, the users documents / similar, or would holding them in the game temp folder be sufficient do you think? 
Will the patch be installed from the game itself? (using an online system of some sort) if not, you're better off saving it in the temp folder then having the script in the game find the patches from the temp folder.

With regards to the whole bat thing, its not overly hard to just make an actual exe that runs the game.exe.. Call it launcher.exe.. could even have the icon determined from the launcher exe, and then have a script inside your game that checks for command line arguments (I wrote one of those too), then, if a certain argument is specified (which can be done from within the launcher exe), then the game code runs, if not, the game closes.. This would ensure people HAVE to use the launcher to get to play the game. 🙂
Interesting...
Will the patch be installed from the game itself? (using an online system of some sort) if not, you're better off saving it in the temp folder then having the script in the game find the patches from the temp folder.
Yes. This is a quick overview of how it works..

Select 'update' option from game title, game then checks my server for patches and downloads them into a folder called 'Patches'. Then, the game it told to restart, which triggers the activation of the patch files. When the restart happens, the game is completely closed, then reopened as though the launcher reopened it. 

Interesting...
Yea, I have developed a whole web of interesting things to try and help secure my scripts a little more 😀

Your tutorial is certainly getting added to that list, perhaps mixed with some of my own tricks 😉
I actually have an idea to create a bat file for security measures that disallows the user to open the archive at all and extracts it on its own therefore Eliminating the decryption issue. 100% Game protection. 
Others have used that approach before, and it only helps until someone finds the folder itself - then all your "protection" is gone. Somewhere on the forum is the old topic of someone else using an "unknown" folder and a wrapper to protect files from being copied, and it was less than a week before everyone knew how and where to find the supposedly protected resources.

Running a game from an archive has some advantages, but "Game Protection" is not one of them - it doesn't provide more protection for the resources used than using the regular encryption.
Yea, nothing is ever really 'secure', in any sense of the word. Best you can hope for is a good strong deterrent 😀
Yes. This is a quick overview of how it works..

Select 'update' option from game title, game then checks my server for patches and downloads them into a folder called 'Patches'. Then, the game it told to restart, which triggers the activation of the patch files. When the restart happens, the game is completely closed, then reopened as though the launcher reopened it. 
Well in that case could you have the game install the patch files into "%temp%/patchfolder"? and that work?

Others have used that approach before, and it only helps until someone finds the folder itself - then all your "protection" is gone. Somewhere on the forum is the old topic of someone else using an "unknown" folder and a wrapper to protect files from being copied, and it was less than a week before everyone knew how and where to find the supposedly protected resources.

Running a game from an archive has some advantages, but "Game Protection" is not one of them - it doesn't provide more protection for the resources used than using the regular encryption.
Ahh... phooey.
Yea, that probably would work.. I dislike the idea of holding them in a temp folder though 😛
Oh my! That's actually handy.

Do I have to buy a license to WinRAR?
You don't have to, you get a free trial but even when that trial runs out you can still use it. http://www.rarlab.com/download.htm
Lol, before my pc crashed I was using the same free expired winrar trial for like, 2 years or something 😀
I've been using a trial version of winrar since forever, but I guess if I want to release my commercial game with it, I should buy a license.
Lol, before my pc crashed I was using the same free expired winrar trial for like, 2 years or something 😀
Same here lol.

I've been using a trial version of winrar since forever, but I guess if I want to release my commercial game with it, I should buy a license.
http://cdn.meme.am/instances/500x/32678350.jpg

I'm not sure why it doesn't force you to pay for it... but this article on their website says this:

Section 6 The "Try Before You Buy" ModelThe Customer may download the RAR Software, at no charge, from the Web sites www.win-rar.com and www.rarlab.com and use the software, again at no charge, for 40 days. During this period, all of the functions of the RAR Software are available to the user with the exception of the functions: "Add authenticity information", "Show protocol file" and "Delete protocol file". The purchaser should test the RAR Software during this test phase to determine if it meets his requirements and needs. In particular, the Customer must determine if the RAR Software runs under his operating system and in his desired hardware and software environment. He promises to acquire a Licence for the RAR Software only if and when he has assured himself that he can answer the above-mentioned questions with "yes".
What ever that means...
I'm not sure why it doesn't force you to pay for it... but this article on their website says this:


What ever that means...
Oh, apparently we were not supposed to use it after the 40 days.
Lawl...

Original thread: https://forums.rpgmakerweb.com/threads/run-game-from-exe.42015/