Jump to content
mooms

WinRAR AiO x86/x64 SFX & AddOn Maker

Recommended Posts

With this maker you can made switchless installer (and RVMi/nLite AddOn), with your own license file, in the language of your choice, and adding themes & customizations.
 
Tutorial:
 
- Download and extract this archive in a work folder:
 

WinRAR_SFX_Maker_3.0.zip
MD5: 79e9d63a2d3ff34cd38fa449cdc42e88
SHA-1: 11f35c9c54ca06272d0bf974959dd367b81da1bf
Size: 419 KB


- Download a copy of the Winrar setup in your language: http://www.rarlab.com/download.htm
You can grab both x86 & x64 versions to make an AiO installer, the sfx will take care to install the correct version.
Please note that installing 32 bits WinRAR on 64 bits Windows is not possible with this maker (there is no good reason to not install 64 bits WinRAR on 64 bits Windows anyway).

 
- Place the installer(s) in the setup folder. (keep the original names)
 
- Optional: put a valid rarreg.key (Winrar license file) in the setup folder
 
- Optional: extract the theme(s) you want to add in \Themes\theme_name\
                     Each theme must be extracted in his own subfolder
                     Themes can be downloaded here: http://www.rarlab.com/themes.htm
 
- Optional: If you want to add custom prefs to you Winrar install (like enabling a theme you have added),
                  you can edit the file rar.reg accordingly and place it in the setup folder.
 
- Optional: If you want to create an AddOn for RVMi/nLite, edit the script and change the value to "set addon=1"

- Run WinRAR_SFX_Maker.cmd

The  switchless installer and AddOn are created in the output folder.
 

 
As long as Winrar installer routine is not modified this maker will work, so keep it, it will be usefull again when Winrar will be updated.
(Read this thread for an in depth explanation of the capability of this maker)

Share this post


Link to post
Share on other sites

the original winrar installer will copy it if you put it in the same dir

 

That never worked for me.

 

Tried once more time, deleted these two lines:

RunProgram="x86:hidcon:cmd /c copy rarreg.key \"%ProgramFiles%\\WinRAR\\\" /y"RunProgram="x64:hidcon:cmd /c copy rarreg.key \"%ProgramW6432%\\WinRAR\\\" /y"

and ran the maker: Winrar is unregistered.

Share this post


Link to post
Share on other sites

Hi ianymaty,
 
I never used themes, but after a quick look I can see they are installed in %APPDATA%\WinRAR\Themes\theme_name\ so in 7zip config file we should add this line:

RunProgram="hidcon:cmd /c xcopy Themes \"%APPDATA%\\WinRAR\\Themes\" /s /i /y"

and add theme(s) decompressed in \binary\Themes\theme_folder

 

I have added a step by step guide to add themes in the first post.

Share this post


Link to post
Share on other sites

Thank you for the effort.

 

Just a small request, again. Please make it to use the original WinRAR icon for the final sfx file.

 

I patched 7zsd.sfx file myself for me with Resource Hacker but make it for all others.

Share this post


Link to post
Share on other sites

I prefer to keep the original icon, less risk for false positives with antivirus (7zsd used is UPX'ed) and it's a 7zip sfx archive after all.

 

Why not sharing the one you've made ? You can attach the file in your post.

Share this post


Link to post
Share on other sites

Interesting, but 7zip modified module bring another advantages like better compression, the possibility to make dual arch installer, multiple install scenario, etc....

Share this post


Link to post
Share on other sites

You're right, but I do not think in this case, when the difference is only 100 Kb, 100 Kb that perhaps do not count, since the 7zsfx is more than 100 kb,  so in this case in the end maybe the WinRar.exe (7-Zip Sfx Mod) is perhaps biggest regard WinRar.exe (WinRar Sfx Mod)

 

Ciao.

Edited by OnePiece

Share this post


Link to post
Share on other sites

When I posted the request I didn't tested the final installer to make sure it works.

 

Seems that patching the 7zsd.sfx file for the original WinRAR icon somehow brake the installer. It doesn't seem to install anything.

 

I tryied to patch the final file aswell, the same thing happens.

 

I'd like to use the original icon for the final file but can't manage to do it with my limited knowledge.

Share this post


Link to post
Share on other sites

@OnePiece: 7zsd.sfx  is UPXed so it weighs only 54 KB.

I have compared the 32bits French installer : even with the module + config the resulting file is about 100 KB smaller than the original Winrar installer.

 

 

@ianymaty: if you have replaced the icons in the provided 7zsd.sfx I think it failed because it is UPXed.

You should have made the changes in an original (uncompressed)  7zsd module then compressed it with UPX eventually.

 

 

 

Made a new version of the maker with the two modifications suggested by ianymaty: the possibility to add themes and patched 7zsd.sfx with original Winrar installer icon. (tested in VirusTotal: no false positive).

Share this post


Link to post
Share on other sites

version 2 of the maker: now everything is included in an executable.

 

indeed, I just tested this version and all seems to work very fine (winXP_sp3, win7_SP1, win81)

Share this post


Link to post
Share on other sites

Version 2.1: now the renaming is done by the maker, you just have to put the installers in the binary folder.
 
Important: renaming will fail if the setup names are not in this form:
 
winrar-x64*.exe for 64 bits versions
wrar*.exe for 32 bits versions

 

(where * can be any number of characters)
 
This is the naming convention of the official site so as long as you download them from there it will be OK, but third party download sites often renames the setups so be careful.

 

You can verify the renaming was OK by looking in the binary folder after you ran the maker: the 64 bits setup should be named rar64.exe and the 32 bits setup rar32.exe .

Share this post


Link to post
Share on other sites

Hi... I created a WinRAR AIO made with 7z-sfx, you need three folders:

 

X86 (All x86 files uncompressed + rarreg.key + Themdef.reg inside)

X64 (All x64 files uncompressed + rarreg.key + Themdef.reg inside)

Temas (your favorite Themes)

 

Sfx:

;!@Install@!UTF-8!SetEnvironment="Name=WinRAR"SetEnvironment="Vers=v5.00"Title="%Name% %Vers% x86/x64 esp Silent..."BeginPrompt="    Creado por alfreire¿Quieres instalar %Name% %Vers%...?"ExtractDialogText="%Name% %Vers% x86/x64 español"FinishMessage="Instalación finalizada correctamente... ;-)"GUIFlags="2+4+8+16+32+2048"MiscFlags="4"ExtractTitle="Extrayendo archivos..."ExtractCancelText="Cancelar la instalación"RunProgram="hidcon:cmd /c xcopy \"%%T\\Temas\" \"%appdata%\" /y /e /i /c /h"RunProgram="hidcon:x86:cmd /c xcopy \"%%T\\x86\" \"%programfiles%\\WinRAR\" /y /e /i /c /h"RunProgram="x86:\"%programfiles%\\WinRAR\\Uninstall.exe\" /clean"RunProgram="x86:\"%programfiles%\\WinRAR\\Uninstall.exe\" /setup /s"RunProgram="x86:REGEDIT /S \"%programfiles%\\WinRAR\\Themdef.reg\""RunProgram="hidcon:x64:cmd /c xcopy \"%%T\\x64\" \"%programW6432%\\WinRAR\" /y /e /i /c /h"RunProgram="x64:\"%programW6432%\\WinRAR\\Uninstall.exe\" /clean"RunProgram="x64:\"%programW6432%\\WinRAR\\Uninstall.exe\" /setup /s"RunProgram="x64:REGEDIT /S \"%programW6432%\\WinRAR\\Themdef.reg\"";!@InstallEnd@!

Themdef.reg:

[HKEY_CURRENT_USER\Software\WinRAR\Interface\Themes]"Activepath"="sscom_winrar_48x"[HKEY_CURRENT_USER\Software\WinRAR\Profiles\0]"Name"="Perfil predeterminado""Default"=dword:00000001"ImmExec"=dword:00000000"ExclNames"="""StoreNames"="""UseRAR"=dword:00000001"SFXModule"="""SFXIcon"="""SFXLogo"="""SFXElevate"=dword:00000000"CmtFile"="""CmtDataWide"=hex:00,00"VolumeSize"="0""VolSizeMod"=dword:00000000"VolPause"=dword:00000000"OldVolNames"=dword:00000000"RecVolNumber"=dword:00000000"Update"=dword:00000000"Fresh"=dword:00000000"SyncFiles"=dword:00000000"Overwrite"=dword:00000000"Move"=dword:00000000"ArcRecBin"=dword:00000000"ArcWipe"=dword:00000000"WipeIfPassword"=dword:00000000"Solid"=dword:00000000"AV"=dword:00000000"Test"=dword:00000000"Recovery"=dword:00000000"EraseDest"=dword:00000000"AddArcOnly"=dword:00000000"ClearArc"=dword:00000000"Lock"=dword:00000000"Method"=dword:00000001"DictSizeLZ"=dword:00400000"Background"=dword:00000000"WaitForOther"=dword:00000000"Shutdown"=dword:00000000"PasswordWide"=hex:49,4a"EncryptHeaders"=dword:00000000"OpenShared"=dword:00000000"ProcessOwners"=dword:00000000"SaveStreams"=dword:00000000"GenerateArcName"=dword:00000000"VersionControl"=dword:00000000"GenerateMask"="yyyymmddhhnnss""FileTimeMode"=dword:00000000"FileDays"=dword:00000000"FileHours"=dword:00000000"FileMinutes"=dword:00000000"FileTimeBefore"=dword:88000000"FileTimeAfter"=dword:88000000"ArcTimeOriginal"=dword:00000000"ArcTimeLatest"=dword:00000000"mtime"=dword:00000004"ctime"=dword:00000000"atime"=dword:00000000"PathsAbs"=dword:00000000"PathsNone"=dword:00000000"PathsAbsDrive"=dword:00000000"SeparateArc"=dword:00000000"EmailArcTo"="""PackDetails"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00  [HKEY_CURRENT_USER\Software\WinRAR\Viewer]"Type"=dword:00000002"DosCharSet"=dword:00000000"ReuseWindow"=dword:00000000"Wrap"=dword:00000001"ViewerUnpackAll"="*.exe *.msi *.htm *.html""ViewerIgnoreModifications"="""ExternalViewer"="

Need "WinRAR_Silent.exe -y" to full silent install...

 

Thanks and regards... ;-)

 

p.d.: I apologize if my post is not appropriate...

Edited by alfreire

Share this post


Link to post
Share on other sites

Hi alfreire, that's similar to the OnePiece method he posted above, but with 7zip sfx instead of winrar sfx
 
You can achieve the same without extracting WinRAR setups with this much simpler config file:
(Install is silent, all files are in the root of the 7zip archive except themes who are in the Temas subfolder)

;!@Install@!UTF-8!GUIMode="2"MiscFlags="4"RunProgram="x86:rar32.exe /S"RunProgram="x64:rar64.exe /S"RunProgram="x86:hidcon:cmd /c copy rarreg.key \"%ProgramFiles%\\WinRAR\\\" /y"RunProgram="x64:hidcon:cmd /c copy rarreg.key \"%ProgramW6432%\\WinRAR\\\" /y"RunProgram="hidcon:cmd /c xcopy Temas\"%APPDATA%\\WinRAR\\Themes\" /s /i /y"RunProgram="\"regedit\" /S Themdef.reg";!@InstallEnd@!

Share this post


Link to post
Share on other sites

 

Hi alfreire, that's similar to the OnePiece method he posted above, but with 7zip sfx instead of winrar sfx

 

You can achieve the same without extracting WinRAR setups with this much simpler config file:

(Install is silent, all files are in the root of the 7zip archive except themes who are in the Temas subfolder)

Thanks... I know that, but the problem is that WinRAR x64 is installed in %programfiles(86)% that way...

Regards... ;-)

Share this post


Link to post
Share on other sites

Thanks... I know that, but the problem is that WinRAR x64 is installed in %programfiles(86)% that way...

Regards... ;-)

That's not true. Try my maker and you'll see.

Share this post


Link to post
Share on other sites

 

That's not true. Try my maker and you'll see.

 

Yes, you are right... I don´t remember why choose this sfx mode, but I remember some problem in X64 mode... works anyway...

Thanks and regards... ;-)

 

p.d.: I think I remember, I wanted to run a cleanup of any previous version before installing the new...

SFX commands: PresetupPresetup=<program>SFX will try to execute <program> before starting extraction. The destination folder is set as the current before executing <program>. You may use this command, for example, to remove a previous version of program, when installing a new version over the old one. If a program name contains spaces, it must be enclosed in quotes.ExamplePresetup=uninstall.exe /clean
Edited by alfreire

Share this post


Link to post
Share on other sites

That's already done by the original installer if you don't extract it (or if you recreate it like Onepiece explained).

 

In your install scenario the uninstall.exe /clean command should be run before copying WinRAR folder in the program files (you can run it from the temp sfx folder).

Share this post


Link to post
Share on other sites

That's already done by the original installer if you don't extract it (or if you recreate it like Onepiece explained).

 

In your install scenario the uninstall.exe /clean command should be run before copying WinRAR folder in the program files (you can run it from the temp sfx folder).

Thanks again...

Regards... ;-)

Edited by alfreire

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×