Create WinRAR SFX


#1. Post Posted: 02-21-2019, 08:52 PM
This tutorial will show basics in creating WinRAR self extracting archives (SFX)
for the purpose of making a simple "Standalone Program or .exe"

You may wish to just make a self extracting archive, which is simpler, If you can do this, u can do that.

In this example, I will demonstrate how to create a simple .exe from files using WinRAR and make it executable.

Q: What an SFX?

A: Self-extracting (SFX) archives. An SFX (SelF-eXtracting) archive is an archive, merged with an executable module, which is used to extract files from the archive when executed. Thus no external program is necessary to extract the contents of an SFX archive, it is enough to execute it.

I will be using a simple game I found on the Webs, One of my old fav's

Sega Monaco GP  1979 re-make by geecab (any files will work, just an example)

Here are the files I will be including inside the SFX archive:

[Image: Dw2O7qd.png]

You can see I made a simple batch file here (monaco.bat) for the purpose of Game starting after extraction.

To create a simple .bat file, open notepad , add text lines, save as all types, change .txt to .bat
This will create the .bat executable file, you can delete the .txt now

Create
[Image: dBxXHlj.png]
Save as
[Image: ezTpcRy.png]
All types ,  Rename .bat
[Image: NxHTFNV.png]

This .bat:
[Image: KI6qx84.png]

cd = change directory
%~dp0 expands to current directory path of the running batch file.

In this case, we are going to extract to %temp% folder in Win directories
Why: using the %temp% folder using this process, Windows will execute said file from
there and delete it after, or rewrite it on subsequent executions

Start command is....self explanatory, and can be used to launch certain .exe's with "switches" or .cfg's

Example :
start mgpr.exe -cfg  pursuit_8bit_1280x1024.cfg

will execute this particular file to a set game .cfg and resolution
different programs will vary on switches ect

This tutorial is about SFX > .bat will be another time:) Moving forward >

Start by compressing folder using WinRAR

[Image: N7Muk4p.png]

Use standard compression setting as I have experienced issues personally with other settings

[Image: 5mM6COI.png]

Open WinRAR and find the folder where you compressed the file using WinRAR GUI

Once selected, click on "Tools" tab, select " convert archive to SFX

[Image: ERiYoB1.png]

You will see this :           click on advanced SFX option's tab now
                     

[Image: IIiix5U.png]

Under general Tab, add  %temp%         (for our purposes of standalone)
un-tick "save and restore paths" , not needed here.

[Image: s74sj3J.png]

Update Tab, select options as follows:

[Image: 7utimfo.png]

Setup Tab

Here we have to designate the executable path

[Image: bjt6rVq.png]

Mode tab

Select "unpack to temp folder" and select "hide all"
Hides extraction process

[Image: mkak2IA.png]

Text and Icon Tab

Name your .exe (example: RetroZoneGP)

You can select a Logo and Icon here

Logo's should always be in .bmp format and Icons in .ico
I use irfranview  free software, for easy converts and resizes
Note: Icons should be 128x128 or smaller

[Image: 8JV8Wlh.png]

[Image: KTGpJCQ.png]


For this example, other tab's are not used, feel free to play around.

Click "OK" then in main WinRAR window, OK again to start process...

In your main folder, you will see your .exe now

[Image: dQg32sH.png]

Click and Test....

[Image: elmRYLo.png]

[spoiler=Voila!]









[/spoiler]
Reply
#2. Post Posted: 02-22-2019, 05:49 AM
Nice tutorial Pinky. Don't get me wrong but ESET detects the your example SFX extracting process as virus, maybe it is false alarm?

Here's the full details what ESET got :
\MonacoRZ\mgpr_launcher.exe Win32/Ramnit.E virus

As Ramnit shows as backdoor virus.
My Steam Profile (Card Style) : 

[Image: 76561198027698389.png]
Reply
#3. Post Posted: 02-22-2019, 06:00 AM
Interesting...

Doing a system scan right now

I do scan these files before uploading....Hmmm

Thanx for the heads up++
Reply
#4. Post Posted: 02-22-2019, 07:36 AM
No problem Big Grin
My Steam Profile (Card Style) : 

[Image: 76561198027698389.png]
Reply
#5. Post Posted: 02-22-2019, 11:47 AM
Don't get me wrong but I use Eset Nod32 AV System and is very good, but sometimes it can be a little pita with files like these, most of them giving you false positives, same happens with certain cracks or keygens Confused best thing to do is temporarily disable protection and run the .exe file while is off.
I've done questionable things.
Reply
#6. Post Posted: 02-22-2019, 12:04 PM
SFX are quite simple, the biggest issue can be simply the compressed data that triggers the AV/Trojan/"Oh my god it's gonna kill your computer"/Virus yadda...

I have a MAME ROM that triggers Malwarebytes Anti-Malware.... Seriously...
Any of my "Intro's are usually crunched using UPX exe compression, which AV's jump on cos they are dumb.
You got more chance of Malware/Spyware/Adware/Ransomware than a Virus nowdays....

Virus's as such are "Old school" compared to modern exploits.

I don't use ANY of the main brand Anti-Virus programs any more as they are all as bad as each other.
"We stopped 10.000.000 virus's last month" crap, yeah and most were false positives.

Best AV's I found are (In no order)

PANDA Anti-Virus
Kaspersky Anti-Virus
Bitdefender

Other software to keep you clean
Mawarebytes Anti-Malware/Anti-Rootkit (Free) - The Anti-Rootkit is a must if you connect to other "unknown" computers regular. Rootkits are destructive
Spybot Search and Destroy v1.6x - Easier to use than v2.xx
CCleaner - Trash the temps fast !

SANDBOXIE - Exactly what it says on the box... An unknown/newly downloaded app, - Sandbox it and run, set AV to scan the Sandbox. Simple

Now I ain't saying you have no chance of getting a virus, but if you scan once a month you keep your computer clean. I have not had a virus outbreak n over 10 years. The last one that tried to be an outbreak was locked down within seconds of it running.

Google Chrome and Doubleclick are the worst for spyware/adware
Reply

Jump To:


Users browsing this thread: 1 Guest(s)