alfreire Posted November 11, 2013 Share Posted November 11, 2013 (edited) 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 November 11, 2013 by alfreire Quote Link to comment Share on other sites More sharing options...
mooms Posted November 12, 2013 Author Share Posted November 12, 2013 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 Quote Link to comment Share on other sites More sharing options...
alfreire Posted November 12, 2013 Share Posted November 12, 2013 (edited) - 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 November 12, 2013 by alfreire Quote Link to comment Share on other sites More sharing options...
bphlpt Posted November 12, 2013 Share Posted November 12, 2013 - 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 alfreire 1 Quote Link to comment Share on other sites More sharing options...
alfreire Posted November 12, 2013 Share Posted November 12, 2013 - 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... ;-) Quote Link to comment Share on other sites More sharing options...
bphlpt Posted November 12, 2013 Share Posted November 12, 2013 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 alfreire 1 Quote Link to comment Share on other sites More sharing options...
mooms Posted November 12, 2013 Author Share Posted November 12, 2013 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) ThisSetEnvironment="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: Quote Link to comment Share on other sites More sharing options...
alfreire Posted November 12, 2013 Share Posted November 12, 2013 (edited) 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: Regards... ;-) Edited November 12, 2013 by alfreire Quote Link to comment Share on other sites More sharing options...
mooms Posted November 12, 2013 Author Share Posted November 12, 2013 Interesting, even on the Russian thread the latest beta is still 1.6.0.2712, where do you have found this version? Quote Link to comment Share on other sites More sharing options...
alfreire Posted November 12, 2013 Share Posted November 12, 2013 Interesting, even on the Russian thread the latest beta is still 1.6.0.2712, where do you have found this version?I extract this version from Universal Extractor sfx made by Gora http://gora.7zsfx.info/addons/Universal_Extractor_1.7.8.90_sl2p_131026_06-51.7z :cap: Regards... ;-) Quote Link to comment Share on other sites More sharing options...
mooms Posted November 12, 2013 Author Share Posted November 12, 2013 I see, thanks. Quote Link to comment Share on other sites More sharing options...
qwesta Posted November 13, 2013 Share Posted November 13, 2013 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 Quote Link to comment Share on other sites More sharing options...
mooms Posted November 15, 2013 Author Share Posted November 15, 2013 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.zipedit: link removed, version is deprecated. Quote Link to comment Share on other sites More sharing options...
qwesta Posted November 16, 2013 Share Posted November 16, 2013 Please try it and report if it works as intended: It is now OK and works flawless:NB:- only the Addon works but not the SFX Quote Link to comment Share on other sites More sharing options...
mooms Posted November 16, 2013 Author Share Posted November 16, 2013 NB:- only the Addon works but not the SFXThanks 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. Quote Link to comment Share on other sites More sharing options...
qwesta Posted November 18, 2013 Share Posted November 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
mooms Posted November 18, 2013 Author Share Posted November 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
qwesta Posted November 18, 2013 Share Posted November 18, 2013 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 Quote Link to comment Share on other sites More sharing options...
mooms Posted November 18, 2013 Author Share Posted November 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
oguz Posted December 9, 2013 Share Posted December 9, 2013 (edited) Hi @moms,Can u make some sfx maker for 7zip? Edited December 9, 2013 by oguz Quote Link to comment Share on other sites More sharing options...
oguz Posted December 9, 2013 Share Posted December 9, 2013 (edited) @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 December 9, 2013 by oguz Quote Link to comment Share on other sites More sharing options...
mooms Posted December 9, 2013 Author Share Posted December 9, 2013 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.7zAnd 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/ Quote Link to comment Share on other sites More sharing options...
mooms Posted January 4, 2014 Author Share Posted January 4, 2014 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 Quote Link to comment Share on other sites More sharing options...
ianymaty Posted January 4, 2014 Share Posted January 4, 2014 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. Quote Link to comment Share on other sites More sharing options...
mooms Posted January 4, 2014 Author Share Posted January 4, 2014 @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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.