Jump to content

WinRAR SFX Maker 3.3


mooms

Recommended Posts

v2.5_test2:
 
What's new:

- If you have added some themes, the XP AddOn is executed at "RunOnceEx" (= after the first login) to allow the copy of the themes in the user folder. the media where the installer is stored (usually CD/DVD/USB) must be present at this time.

- If the "Themes" folder is empty, the XP AddOn is executed at T-13, like a regular SVCPACK AddOn.

 


 
WinRAR_SFX_Maker-v2.5_test2.7z
 

edit: see below for new version

Link to comment
Share on other sites

Sorry, I can't test it in XP. Maybe there are other users who can test it.

 

I'm wondering why are you renaming the files in the process? Can't you just use the files with their original downloaded names? They are named according with lang code appended except the english version.

 

Can you make it multilanguage? What if you put more languages in the binary folder? Will it pack them separately each languages or all together? If all together the installer will select the correct language for install according to system language?

 

For the final SFX name would be nice to name it as close as possible to original name. Something like SFX_AIO_WinRAR-501xx (xx=lang code).

Link to comment
Share on other sites

The icon/theme issue is one I've had for a loooong time. It's simply due to winrar not telling windows which icon to use until it's first opened.

It's worse than that Kel, we must select again the theme in WinRAR options, simply opening it don't do anything.

In Windows 7, UAC is triggered when WinRAR install a theme, but not when changing it, kinda weird.

 

I'm wondering why are you renaming the files in the process?

Renaming the original installer is needed to be executed silently by the SFX.

also respecting the old 8.3 convention is a good idea for XP.

The renaming was also made by older versions, but the final name or the SFX was static.

 

The naming we talk here is for the SFX and the AddOn (and ENTRIES_WinRAR.ini inside it).

 

It took me a certain time to properly extract the version and lang values. (I'm a beginner in the "art" of batching).

 

x86 are named this way: wrarVVVL.exe

x64 are named this way: winrar-x64-VVVL.exe

 We have two variables:

VVV is the version number, in (almost*) all versions it is three numbers without dots.

example WinRAR 5.01 is named 501, so I had to add the dot for correct naming.

(*some versions in version 5.00 and earlier had only 2 numbers for the version, in this case the renaming will fail, but it is only cosmetic. Versions 5.01 are all properly named so nothing to worry about.)

 

L is the language, between 0 (if English) and 6 letters. The maker will take up to 7 characters.

 

The maker will parse the two values and make like this: V.VV-L (notice the dot)

 

Can't you just use the files with their original downloaded names? They are named according with lang code appended except the english version.

I could have used the entire original name of the installer and rename the final SFX after it, maybe with SFX_ at the beginning, it would have been much simpler to do, but I think it is more elegant as it is now (and parsing the values is necessary to populate correctly the file ENTRIES_WinRAR.ini ).

 

For the final SFX name would be nice to name it as close as possible to original name. Something like SFX_AIO_WinRAR-501xx (xx=lang code).

You can change how the SFX & AddOn are named (like removing the "-" between the two variables) if you open the batch, search for these strings:

%VRS%-%LNG% and remove the "-" between the two variables.

You can replace by anything you want. (but don't mess with variables unless you know what you are doing)

 

Can you make it multilanguage? What if you put more languages in the binary folder? Will it pack them separately each languages or all together? If all together the installer will select the correct language for install according to system language?

All the content of the binary folder, except empty folders, is compressed and added to the SFX, the maker is designed this way.

 

In case of a single x86 installer, only version and lang values are in the name of the SFX & AddOn.

In case of a single x64 installer, "x64" is also added because of its incompatibility with  Windows 32 bits.

In case of both x86 & x64 installers, "AIO" is also added to reflect this.

In case of mixed language/version number in the AIO version, the higher version number is used, and the 32 bits language value is used.

If you put more than one x86 and/or one x64 version in the binary folder, only the first of each will be installed, because the renaming is done on the first matching name the batch will found.

If your installers are already renamed rar32.exe and/ or rar64.exe, the batch file will fall back to the "old way", SFX and AddOn will have generic names like in v2.3 and earlier. (no variables used except the date in ENTRIES_WinRAR.ini)

 

If the installer have some exotic names (or are really missing), the maker will exit with a text file popping up.

(try it, it is really cool, I'd "stolen" the idea from vmanda's Firefox maker :pirate: many thanks to him :thumbsup:  )

 

It should be possible to install the correct version accordingly to the language of the OS, but this suppose to rename each installer with correct LCID, and it will exponentially complicate the batch file and/or the sfx config.

It is way beyond the scope of this maker, and if someone will really need to do this, he must have the skills to do it itself.

 

 

They are named according with lang code appended except the english version.

I've realized when answering you that I forgotten to take care of the case of the English version, where the L value is missing.

It is now corrected with test3 (if L value is missing, it is set to "en")

WinRAR_SFX_Maker-v2.5_test3.7z

edit: link removed.

Link to comment
Share on other sites

Version 2.5 final released as and exe and as a batch.(if you want to know how it's done, or change some parameters)

Link in the first post.

 

What's new since version 2.2:

 

- RVMi/nLite AddOn is systematically created

- Adds the version number and language value in the name of the SFX & the AddOn (only works if installers have their original names, if not the maker will fallback to the "old way"

- adds the date, version number, and language value in the file ENTRIES_WinRAR.ini in the AddOn

- detects if you have put the x86, x64, or both setups and name the created files accordingly.

- Now the files are created in the output folder.

- If you have added some themes, the XP AddOn is executed at "RunOnceEx" (= after the first login)

to allow the copy of the themes in the user folder.

- If the "Themes" folder is empty, the XP AddOn is executed at T-13, like a regular SVCPACK AddOn.

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...
  • 1 year later...

Update:

  • Updated 7za and the sfx module.
  • The setups are no longer renamed, the config file is now dynamically generated.
  • The Binary folder has been renamed to setup, so it's clearer.
  • Themes are now to be placed in the Themes folder.
  • The AddOn is no longer created by default. It is still possible to create it if desired.
  • Added error and success messages.
  • In-depth review of the script.
  • Removed the executable, the script is open source and I prefer.
Link to comment
Share on other sites

  • 4 months later...

Version 3.1

  • Updated 7za to version 1805.
  • Updated the icon of the sfx module from WinRAR 5.60.
  • Added a theme in the Themes folder (the previous default theme of WinRAR).
  • If you copy the file rar.reg in the setup folder, the old default theme will be applied.
  • Rewritten the creation of the sfx config file: now the parameters are dynamically created when corresponding options are used (previously all parameters where added even if not used).
  • If you embed theme(s) and create an AddOn, the sfx in the SVCPACK AddOn will be copied in a temp folder then executed at RunOnce (this way you can remove the install media after the install is finished).
  • You can now install WinRAR 32 bits on a 64 bits Windows.
Link to comment
Share on other sites

  • 1 month later...
  • 2 years later...

Hi, Winrar is installed but the themes are not copied to the appdata folder during a new Windows 10 installation.

The Themes do get copied to appdata,WinRAR,Themes when I double click and install the winrar.exe.
I have already tried everything in my setupcomplete.cmd script.

REM Winrar Skins
SET "SOURCE=%SLocal%\WinRarSkins"
mkdir "%APPDATA%\WinRAR\Themes"
SET "DESTINATION=%APPDATA%\WinRAR\Themes"
IF EXIST "%SOURCE%" XCopy "%SOURCE%" "%DESTINATION%" /S /I /Q /Y /F

The WinRAR folder is not even created in appdata ? with a new windows 10 installation.


I have made also an themes.exe with all the folders, en try to install silent with the setupcomplete.cmd

But no themes.

I have this in my themes.exe

;The comment below contains SFX script commands

Path=%appdata%
SavePath
Silent=1
Overwrite=1

I can not install it with a new Windows 10 Installation.

If i doubleclick the Themes.exe, than i get the themes in the appdata folder, also your WinRAR.exe is working if i doubleclick, but not in my Windows 10 ISO file.

 

Best regards

Link to comment
Share on other sites

I've installed SFX_WinRAR_x64_6.01-fr.exe in a virtual machine, no issue and the classic theme is active on first launch:

spacer.png

 

As I said, your issue is likely caused because the environment for the user is not yet created when the SFX is executed.

Workaround:

In WinRAR_SFX_Maker.cmd change set addon=0 to set addon=1

Run the maker as usual with your themes put in Themes folder.

Run the created SFX with the -ai switch, that will copy the setup in %ALLUSERSPROFILE% then launch it on the next reboot, when the first user is already created.

Link to comment
Share on other sites

I have than this.

In WinRAR_SFX_Maker.cmd have changed set addon=0 to set addon=1 

Have made the SFX_WinRAR_x64_6.01-nl.exe with the WinRAR_SFX_Maker.cmd

Put this line in my setupcomplete.cmd

IF EXIST "%SLocal%\SFX_WinRAR_x64_6.01-nl.exe" "%SLocal%\SFX_WinRAR_x64_6.01-nl.exe -ai"

WinRAR is not installed during a new Windows 10 installation.

 

Or should I put -ai in the WinRAR_SFX_Maker.cmd ?

Link to comment
Share on other sites

SFX_WinRAR_x64_6.01-nl.exe -ai is correct.

Do you have rebooted after ? the SFX should run on next reboot.

If you launch it manually with -ai switch, does it run on next reboot ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...