Jump to content
mooms

WinRAR SFX Maker 3.1

Recommended Posts

Hi, friend... with your help and ideas, I updated and simplified my 7z-sfx config to:

RunProgram="x86:wrar500es.exe /S"RunProgram="x64:winrar-x64-500es.exe /S"RunProgram="hidcon:x86:xcopy rarreg.key %programfiles%\\WinRAR /y /e /i /c /h"RunProgram="hidcon:x64:xcopy rarreg.key %programW6432%\\WinRAR /y /e /i /c /h"RunProgram="hidcon:xcopy %%T\\Temas %appdata% /y /e /i /c /h"RunProgram="REGEDIT /S Themdef.reg"

Thanks and regards... ;-)

 

p.d.: Also can rename WinRAR installers to WinRAR500es_x86.exe & WinRAR500es_x64.exe and simplify little more:

RunProgram="WinRAR500es_%%P.exe /S"RunProgram="hidcon:x86:xcopy rarreg.key %programfiles%\\WinRAR /y /e /i /c /h"RunProgram="hidcon:x64:xcopy rarreg.key %programW6432%\\WinRAR /y /e /i /c /h"RunProgram="hidcon:xcopy %%T\\Temas %appdata% /y /e /i /c /h"RunProgram="REGEDIT /S Themdef.reg"
Edited by alfreire

Share this post


Link to post
Share on other sites

Indeed, we can use %%P to simplify the config file, good finding!

 

About your config file:

 

- You should add \" around appdata and ProgramFiles & ProgramW6432 because the full paths contains spaces)

 

- No need to use xcopy to copy rarreg.key, this is what I use:

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

- You can eliminate some switches from your xcopy command to copy themes:

RunProgram="hidcon:xcopy Temas \"%APPDATA%\" /s /i /y"

Should be enough.

Note that %%T isn't needed

Share this post


Link to post
Share on other sites

- You should add \" around appdata and ProgramFiles & ProgramW6432 because the full paths contains spaces)

 

Isn't necessary when we use variable value... test, works perfect... Also can use: SetEnvironment="Path=%programfiles%\\WinRAR"

SetEnvironment="Path=%programfiles%\\WinRAR"RunProgram="WinRAR500es_%%P.exe /S"RunProgram="hidcon:cmd /c copy rarreg.key %Path% /y"RunProgram="hidcon:xcopy %%T\\Temas %appdata% /y /e /i /c /h"RunProgram="REGEDIT /S Themdef.reg"

Regards... ;-)

Edited by alfreire

Share this post


Link to post
Share on other sites

- You should add \" around appdata and ProgramFiles & ProgramW6432 because the full paths contains spaces)

 

Isn't necessary when we use variable value... test, works perfect...

While that might be true, I haven't verified it in all circumstances, I personally agree with mooms and would choose to err on the side of caution and include the \" , as long as including them does not cause a problem. I guess I've been burned too many times by apps that "should" handle embedded spaces correctly, but sometimes don't for some reason.

Also can use: SetEnvironment="Path=%programfiles%\\WinRAR"

But I don't see a problem with this method, AFAIK, but I haven't tried it that way myself. :) Neat approach!

Cheers and Regards

Share this post


Link to post
Share on other sites

 

 

- You should add \" around appdata and ProgramFiles & ProgramW6432 because the full paths contains spaces)

 

Isn't necessary when we use variable value... test, works perfect...

 

While that might be true, I haven't verified it in all circumstances, I personally agree with mooms and would choose to err on the side of caution and include the \" , as long as including them does not cause a problem. I guess I've been burned too many times by apps that "should" handle embedded spaces correctly, but sometimes don't for some reason.

Also can use: SetEnvironment="Path=%programfiles%\\WinRAR"

But I don't see a problem with this method, AFAIK, but I haven't tried it that way myself. :) Neat approach!

Cheers and Regards

 

Thanks & regards... ;-)

Share this post


Link to post
Share on other sites

On second thought, being paranoid I might still choose to write it like this:

SetEnvironment="Path=\"%ProgramFiles%\\WinRAR\\\""

at least once, just to see if I saw any difference in behavior, but again I'll stress that I have not tried it this way myself.

 

And of course since I'd still be surrounding appdata anyway, the consistency appeals to me.

Cheers and Regards

Share this post


Link to post
Share on other sites

alfreire: Which version of the 7zip sfx module do you use ?

I use version 1.5.0.2712 (latest 32bits stable version)

 

This:

SetEnvironment="Path=%programfiles%\\WinRAR"RunProgram="hidcon:cmd /c copy rarreg.key %Path% /y"

Don't work for me. (Key is not copied, tested on Win7 x86 & x64)
 
 
This

SetEnvironment="Path=\"%ProgramFiles%\\WinRAR\\\""RunProgram="hidcon:cmd /c copy rarreg.key %Path% /y"

Works on x86 but key is not copied on x64.
 
But even if it had worked, I think it would have copied the rarreg.key in Program Files (x86) in 64 bits Windows, because we use 32 bits sfx module.

 

 

This:

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

Works 100% of the time. (tested on XP, win7 x86 & x64)

 

 

 

 

While that might be true, I haven't verified it in all circumstances, I personally agree with mooms and would choose to err on the side of caution and include the \" , as long as including them does not cause a problem. I guess I've been burned too many times by apps that "should" handle embedded spaces correctly, but sometimes don't for some reason.

On second thought, being paranoid I might still choose to write it like this:

SetEnvironment="Path=\"%ProgramFiles%\\WinRAR\\\""

 

:beerchug:

Share this post


Link to post
Share on other sites

Works for me in Win7 x86 & x64 SP1 whith this config: (tested in Vmware)

SetEnvironment="Path=%programfiles%\\WinRAR"RunProgram="x86:wrar500es.exe /S"RunProgram="x64:winrar-x64-500es.exe /S"RunProgram="hidcon:cmd /c copy rarreg.key %Path% /y"RunProgram="hidcon:xcopy %%T\\Temas %appdata% /y /e /i /c /h"RunProgram="REGEDIT /S Themdef.reg"

In x64 %programfiles% variable = C:\Program Files => %Path% = C\:Program Files\WinRAR
 
At least with this sfx version:
9N9FLui.jpg
 
Regards... ;-)

 

Edited by alfreire

Share this post


Link to post
Share on other sites

hi, I had no problems to make an addon, but after integration in a CD , it installs well but the themes I added are not there at all in VM(test).

Any suggestions please?

Thank you

Share this post


Link to post
Share on other sites

On which OS are you integrating it ?

If you've created a svcpack addon for XP (this kind of addon generally runs at T-13 stage of the install), it is because the first user was not yet created when the sfx was executed so the themes couldn't be copied.
 
Themes are extracted in %APPDATA%\WinRAR\Themes\
variable %APPDATA% is used here because it is user specific, so the sfx must be executed after user login.
 
 
 
Edit: I've made a new version: the maker will now also create a svcpack AddOn that is executed at RunOnceEx, thanks to these lines:

AutoInstall="hidcon:reg add HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\WinRAR /ve /d \"WinRAR\" /f"AutoInstall="hidcon:reg add HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\WinRAR /v Install /d \"%%S\\%%M\" /f"

Please try it and report if it works as intended:
 
 
WinRAR_SFX_Maker-v2.3.zip
edit: link removed, version is deprecated.

Share this post


Link to post
Share on other sites

NB:- only the Addon works but not the SFX

Thanks for testing.

The AddOn contain the SFX with ai switch to run it at RunOnceEx.

You can launch the SFX with -ai switch on a live system and you'll see it will be run on next reboot.

So, if you want to make your own AddOn, simply add the switch after the name of the sfx like in the AddOn created by the maker.

Share this post


Link to post
Share on other sites

on another note, after running this on a CD I made, I noticed that one has to leave the CD inside the PC on reboot otherwise winrar wont install properly.

Share this post


Link to post
Share on other sites

Which reboot ?

Do you have launched the SFX with -ai switch on a live system from a CD ?

 

 

Again, with this method WinRAR is installed at RunOnceEx (right after the first login in case of an integration), and obviously the source must be present until that.

Share this post


Link to post
Share on other sites

well I did integrate the Addon (with many other Addons) when I was complying a fresh CD. I wished I could remove the CD after fresh installation and rebooted without leaving the CD in the ROM.

That is what I meant.

Thank you for the response anyway

Share this post


Link to post
Share on other sites
I wished I could remove the CD after fresh installation and rebooted without leaving the CD in the ROM.

 

You can, you just have to let it only until first login.

 

If you don't want that, you can use the $oem$ folder.

Share this post


Link to post
Share on other sites

@moms,

Winrar is to create below .reg entry if enable "shell integration, cassade menu options" etc...

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B4C47B710-64E4-39D2-9906-E67AEPC173CA}\InProcServer32]
@="C:\\Program Files\\WinRAR\\rarext.dll"
"ThreadingModel"="Apartment"

 

In this .reg entry's am i manuel edit; @="C:\\Program Files\\WinRAR\\rarext.dll"  with  @="%ProgramFiles%\\WinRAR\\rarext.dll" ?

 

Is your SFXMaker "auto change" as well as this type registy entrys or not? Shortly this type .reg entrys to make a problem or not?

Edited by oguz

Share this post


Link to post
Share on other sites

Hi oguz,

 

I don't really understand your post, or what you are trying to do.

 

The reg entry you mentioned is created by WinRAR, not the maker.

 

 

The maker is actually a cmd script (compiled with bat to exe for convenience), here is the commands:

ren .\binary\winrar-x64*.exe rar64.exeren .\binary\wrar*.exe rar32.exe7za a winrar.7z .\binary\* -mx=8copy /b 7zsd.sfx + config.txt + winrar.7z SFX_WinRAR.exedel winrar.7z

And the content of the sfx config:

;!@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 Themes \"%APPDATA%\\WinRAR\\Themes\" /s /i /y"RunProgram="\"regedit\" /S rar.reg"AutoInstall="hidcon:reg add HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\WinRAR /ve /d \"WinRAR\" /f"AutoInstall="hidcon:reg add HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnceEx\\WinRAR /v Install /d \"%%S\\%%M\" /f";!@InstallEnd@!

The two AutoInstall lines are only in the v 2.3 of the maker, they are used to run the sfx at RunOnceEx for XP AddOn. (with /ai switch).

 

 

You can add any reg entries in the file rar.reg, but the variables are not accepted "as is", see this post.

 

I don't plan to create a maker for 7zip installer, not really needed anyway.

I think the switch to make the original installer silent is /S (it is nsis based).

 

Some general SFX maker that can be used to make 7zip installer silent:

 

http://sourceforge.net/projects/sfx-maker/

http://www.isoft-online.com/

Share this post


Link to post
Share on other sites

I made a new version.

 

What's new:

 

- 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.

 

 

I have tested it with multiple scenarios and I don't see any bugs, but because it is much more complex than the previous versions it needs to be tested much more, so please test it and report how it works:

 

- If the making & install works  (specify your OS/arch/lang)

- If version number and language are correctly added in the name of the SFX & AddOn and in the file ENTRIES_WinRAR.ini in the AddOn,

 

This time it's a batch file, so you can open it and see how it works.

I'm open to any suggestions for improvements.

 

P.S: don't get confused with the two similarly named folder bin and binary, you must put the setup(s)/themes/license in the binary folder as before ! (bin folder is used to store files used by the batch file)

 

WinRAR_SFX_Maker-v2.5_test.7z

edit: see below for new version

Share this post


Link to post
Share on other sites

First of all it works at least for the first intended part.

 

I may have some trouble to achieve what I want.

 

Using the reg to add some tweeks to standard setup it seems that aren't applied after the setup out of the box. You need to go in settings to see them (they are actually there as you set them in reg) and hit OK than it'll ask if you let the program modify the computer to make them work.

 

The same happens with the applied theme. It is checked but not fully applied. The desktop icon remains standard instead of the theme. If you click it again (the theme) than the theme is applied. It seems to do some kind of refresh

 

The tweeks are copied from exported settings of the program so there's no problem there. The tweeks are from Integration Tab (All checked except ISO extension) + the Theme.

 

When you run the SFX first time the Desktop icon doesn't show up. Runing it second time on top the icon show up.

 

As I mentioned above it seems to do some kind of a refresh. I don't know what command is issuing but maybe you or other user know about it and can be integrated in the SFX.

 

I use Windows 7 x64 to make the SFX AIO

 

I may have some other suggestions to improve this...

 

Thank you.

 

 

Share this post


Link to post
Share on other sites

@ianymaty: I see what you mean, theme is applied but the icon is the default one until you have selected the theme again in WinRAR.
 
After investigation wth RegShot, it appears the icon is a per user setting, with full path (we need variables), of the user folder, so it is unusable for a generic installer.
Example on Windows  XP, with an user named "xp" and the theme "sscom_winrar_48x_v2"

Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\WinRAR\Interface\Themes]"Activepath"="sscom_winrar_48x_v2"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinRAR archiver]"DisplayIcon"="C:\\Documents and Settings\\xp\\Application Data\\WinRAR\\Themes\\sscom_winrar_48x_v2\\Setup.ico"[HKEY_CURRENT_USER\Software\Classes\WinRAR\DefaultIcon]@="C:\\Documents and Settings\\xp\\Application Data\\WinRAR\\Themes\\sscom_winrar_48x_v2\\RAR.ico"[HKEY_CURRENT_USER\Software\Classes\WinRAR.REV\DefaultIcon]@="C:\\Documents and Settings\\xp\\Application Data\\WinRAR\\Themes\\sscom_winrar_48x_v2\\REV.ico"[HKEY_CURRENT_USER\Software\Classes\WinRAR.ZIP\DefaultIcon]@="C:\\Documents and Settings\\xp\\Application Data\\WinRAR\\Themes\\sscom_winrar_48x_v2\\RAR.ico"

 
But even with this exact reg file merged by the sfx, the WinRAR icon is still the default one, so it is not something I can fix.
 
 
Anyway, reg import is not a new feature:
 

V2.2 of the maker: added the possibility to import a reg file with customs prefs

 

I would to know if the new features introduced in v2.5 works as intended for everyone.

Share this post


Link to post
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...