September 28, 201213 yr New 7zSFX_Shortcuts.7z updated including: 7zSFX_Install.reg | 7zSFX_Uninstall.reg | ReadMe.txt (English, French) | Image to see the shorcuts.Thanks to improve or tell me if there is errors!Enjoy!*Edit: Updated and added 3 seconds to close the command prompt Available for x86 or x64 sfx modified modules!7zSFX_Shortcuts.7z Edited September 30, 201213 yr by myselfidem
September 29, 201213 yr Hi All.Me Test Code But Show Me Error :Error in Line 4 of configuration data:;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:cmd /c \"%%T\\file_x86.cmd""RunProgram="x64:hidcon:cmd /c \"%%T\\file_x64.cmd"";!@InstallEnd@!Plz Help For Fix.
September 29, 201213 yr Yes, gives error!You can use 7zsd_All.sfx and this config.txt;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:cmd /c file_x86.cmd"RunProgram="x64:hidcon:cmd /c file_x64.cmd";!@InstallEnd@!Or:;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:cmd /c %%T\\file_x86.cmd"RunProgram="x64:hidcon:cmd /c %%T\\file_x64.cmd";!@InstallEnd@!Tested for Daemon Tools Lite and works fine! Edited September 29, 201213 yr by myselfidem
September 29, 201213 yr ;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:cmd /c \"%%T\\file_x86.cmd""RunProgram="x64:hidcon:cmd /c \"%%T\\file_x64.cmd"";!@InstallEnd@!Plz Help For Fix.Correct variants:;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:cmd /c \"%%T\\file_x86.cmd\""RunProgram="x64:hidcon:cmd /c \"%%T\\file_x64.cmd\"";!@InstallEnd@!;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:cmd /c file_x86.cmd"RunProgram="x64:hidcon:cmd /c file_x64.cmd";!@InstallEnd@!;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:file_x86.cmd"RunProgram="x64:hidcon:file_x64.cmd";!@InstallEnd@!;!@Install@!UTF-8!GUIMode="2"RunProgram="%%P:hidcon:file_%%P.cmd";!@InstallEnd@!This variant is not correct too:;!@Install@!UTF-8!GUIMode="2"RunProgram="x86:hidcon:cmd /c %%T\\file_x86.cmd"RunProgram="x64:hidcon:cmd /c %%T\\file_x64.cmd";!@InstallEnd@!
September 29, 201213 yr HelloP.S if i try to do it after windows is install and run wpi then it works fine to unpack and make a desktop and show overIf you want create a shorcut(s) using 7zsd.sfx modified module you can read the explanation here:http://7zsfx.info/en/Configuration file parameters | ShorcutYou can also see an example for Tools for 7z SFX inside Usage examples (# 5)As example, I create an sfx file customized (using the example above) with two shorcuts on the Desktop:config.txt;!@Install@!UTF-8!GUIMode="2"InstallPath="%ProgramFiles%\\7z SFX Tools"OverwriteMode="2"Shortcut="D,{%%T\\7zSD_EN.chm},{},{},{Description Modified 7z SFX module},{7z SFX module chm},{},{%%T\\7zSD_EN.chm},{0}"Shortcut="D,{%%T\\7ZSplit.exe},{},{},{7z SFX module},{7z archive Splitter},{},{%%T\\7z.ico},{0}";!@InstallEnd@!I set 7z.ico inside the archive 7z first, to have another one!Two shorcuts are on my Desktop to open 7zSD_EN.chm and another to open 7ZSplit.exeHTH Edited September 29, 201213 yr by myselfidem
September 30, 201213 yr New 7zSFX_Shortcuts.7z updated including: 7zSFX_Install.reg | 7zSFX_Uninstall.reg | ReadMe.txt (English, French) | Image to see the shorcuts.Thanks to improve or tell if there is errors!Enjoy!I use your first version to create sfx (with output exe name fix), one fot x86 an other for x64 sfx file...Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\shell\7zSFX86]"MUIVerb"="Create file 7z-sfx x86""NoWorkingDirectory"="""Icon"="C:\\Program files\\7-Zip\\7zG.exe, 0""Extended"=-[HKEY_CLASSES_ROOT\Directory\shell\7zSFX86\command]@="cmd.exe /c cd/d \"%1\" && cmd.exe /c copy /b \"C:\\Program files\\7-Zip\\7zsd_All.sfx\" + *.txt + *.7z NewSfx86.exe"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\7zSFX86]"MUIVerb"="Create file 7z-sfx x86""NoWorkingDirectory"="""Icon"="C:\\Program files\\7-Zip\\7zG.exe, 0""Extended"=-[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\7zSFX86\command]@="cmd.exe /c cd/d \"%1\" && cmd.exe /c copy /b \"C:\\Program files\\7-Zip\\7zsd_All.sfx\" + *.txt + *.7z NewSfx86.exe"[HKEY_CLASSES_ROOT\Directory\shell\7zSFX64]"MUIVerb"="Create file 7z-sfx x64""NoWorkingDirectory"="""Icon"="C:\\Program files\\7-Zip\\7zG.exe, 0""Extended"=-[HKEY_CLASSES_ROOT\Directory\shell\7zSFX64\command]@="cmd.exe /c cd/d \"%1\" && cmd.exe /c copy /b \"C:\\Program files\\7-Zip\\7zsd_All_x64.sfx\" + *.txt + *.7z NewSfx64.exe"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\7zSFX64]"MUIVerb"="Create file 7z-sfx x64""NoWorkingDirectory"="""Icon"="C:\\Program files\\7-Zip\\7zG.exe, 0""Extended"=-[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\7zSFX64\command]@="cmd.exe /c cd/d \"%1\" && cmd.exe /c copy /b \"C:\\Program files\\7-Zip\\7zsd_All_x64.sfx\" + *.txt + *.7z NewSfx64.exe"7zsd_All.sfx and 7zsd_All_x64.sfx must be inside 7-zip install folder...And this for 7zSplit:Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\*\shell\7zSplit]@="7ZSplitter""Icon"="C:\\Program files\\7zSplit\\7z.ico""Position"="Top"[HKEY_CLASSES_ROOT\*\shell\7zSplit\command]@="\"C:\\Program files\\7zSplit\\7ZSplit.exe\" \"%1\""[HKEY_LOCAL_MACHINE\SOFTWARE\7zSplit]"Path"="C:\\Program files\\7zSplit\\7ZSplit.exe"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7ZSplit.exe]@="C:\\Program files\\7zSplit\\7ZSplit.exe""Path"="C:\\Program files\\7zSplit"Regards and thanks... ;-) Edited November 2, 201213 yr by alfreire
September 30, 201213 yr For test:;!@Install@!UTF-8!Title="Variables %7zSfxVarModulePlatform% module in %%P OS"BeginPrompt=" Check of variables %7zSfxVarModulePlatform% module in %%P OS• Click 'OK', variables will are shown in a console window• Click 'OK', retaining [Shift], variables will be are saved to the file %SystemDrive%\\vars_%7zSfxVarModulePlatform%_module_on_%%P_OS.txt"FinishMessage="The module %7zSfxVarModulePlatform% finished operation"; SetEnvironment="cmnd=@Echo Off& Title Module - %7zSfxVarModulePlatform%, OS - %%P& Echo Module - %7zSfxVarModulePlatform%, OS - %%P& Echo.& Echo Folders:&Set 7zSfxFolder& Echo.& Echo Vars:&Set 7zSfxVar& Echo %%^M=%%M& Echo %%^P=%%P& Echo %%^S=%%S& Echo %%^T=%%T& Set CommonD& Set MyDoc& Echo UserDesktop=%UserDesktop%& Echo."RunProgram="hidcon:cmd /c Echo"RunProgram="%%P:fm0:cmd /k %cmnd%"AutoInstall="hidcon:cmd /c Echo"AutoInstall="%%P:fm20:hidcon:cmd /c (%cmnd%)>%SystemDrive%\\vars_%7zSfxVarModulePlatform%_module_on_%%P_OS.txt"GUIMode="2"GUIFlags="2+4+8+16+32+2048+4096";!@InstallEnd@!;!@Install@!UTF-8:Language:1049!Title="Переменные %7zSfxVarModulePlatform% модуля в %%P ОС"BeginPrompt=" Проверка переменных %7zSfxVarModulePlatform% модуля в %%P ОС• Нажмите 'OK', переменные будет показаны в окне консоли• Нажмите 'OK', удерживая [Shift], переменные будет сохранены в файл %SystemDrive%\\vars_%7zSfxVarModulePlatform%_module_on_%%P_OS.txt"FinishMessage="Модуль %7zSfxVarModulePlatform% завершил работу";!@InstallEnd@:Language:1049!Version module for test 1.6 build 2496Finally, I undertstand your test... X-D Thanks again... ;-) Module - x86, OS - x64Folders:7zSfxFolder00=C:\Users\Administrador\Desktop7zSfxFolder02=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Start Menu\Programs7zSfxFolder05=C:\Users\Administrador\Documents7zSfxFolder06=C:\Users\Administrador\Favorites7zSfxFolder07=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup7zSfxFolder08=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Recent7zSfxFolder09=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\SendTo7zSfxFolder11=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Start Menu7zSfxFolder13=C:\Users\Administrador\Music7zSfxFolder14=C:\Users\Administrador\Videos7zSfxFolder16=C:\Users\Administrador\Desktop7zSfxFolder19=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Network Shortcuts7zSfxFolder20=C:\Windows\Fonts7zSfxFolder21=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Templates7zSfxFolder22=C:\ProgramData\Microsoft\Windows\Start Menu7zSfxFolder23=C:\ProgramData\Microsoft\Windows\Start Menu\Programs7zSfxFolder24=C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup7zSfxFolder25=C:\Users\Public\Desktop7zSfxFolder26=C:\Users\Administrador\AppData\Roaming7zSfxFolder27=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Printer Shortcuts7zSfxFolder28=C:\Users\Administrador\AppData\Local7zSfxFolder29=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup7zSfxFolder30=C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup7zSfxFolder31=C:\Users\Administrador\Favorites7zSfxFolder32=C:\Users\Administrador\AppData\Local\Microsoft\Windows\Temporary Internet Files7zSfxFolder33=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Cookies7zSfxFolder34=C:\Users\Administrador\AppData\Local\Microsoft\Windows\History7zSfxFolder35=C:\ProgramData7zSfxFolder36=C:\Windows7zSfxFolder37=C:\Windows\system327zSfxFolder38=C:\Program Files (x86)7zSfxFolder39=C:\Users\Administrador\Pictures7zSfxFolder40=C:\Users\Administrador7zSfxFolder41=C:\Windows\SysWOW647zSfxFolder42=C:\Program Files (x86)7zSfxFolder43=C:\Program Files (x86)\Common Files7zSfxFolder44=C:\Program Files (x86)\Common Files7zSfxFolder45=C:\ProgramData\Microsoft\Windows\Templates7zSfxFolder46=C:\Users\Public\Documents7zSfxFolder47=C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools7zSfxFolder48=C:\Users\Administrador\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools7zSfxFolder53=C:\Users\Public\Music7zSfxFolder54=C:\Users\Public\Pictures7zSfxFolder55=C:\Users\Public\Videos7zSfxFolder56=C:\Windows\resources7zSfxFolder59=C:\Users\Administrador\AppData\Local\Microsoft\Windows\Burn\BurnVars:7zSfxVarCmdLine0=7zSfxVarCmdLine1=7zSfxVarCmdLine2=7zSfxVarModulePlatform=x867zSfxVarSystemLanguage=30827zSfxVarSystemPlatform=x64%%M=NewSfx86.exe%%P=x64%%S=C:\Users\Administrador\Desktop%%T=C:\Users\ADMINI~1\AppData\Local\Temp\7ZipSfx.001CommonDesktop=C:\Users\Public\DesktopCommonDocuments=C:\Users\Public\DocumentsMyDocs=C:\Users\Administrador\DocumentsMyDocuments=C:\Users\Administrador\DocumentsUserDesktop=C:\Users\Administrador\Desktop
September 30, 201213 yr A question about InstallPath, how do I get the path "Program files" on x86 and x64...?If I put InstallPath="%programfiles%" I get c:\Program files in x86 and c:\Program files(x86) in x64... x86: and x64: don't work with this command... Regards... ;-)Wow, I'm stupid... InstallPath="C:\\Program files" hahahahaha X-D Edited September 30, 201213 yr by alfreire
October 8, 201213 yr Or you could use 64 bit module.Also, from Wikipedia:%ProgramFiles%This variable points to Program Files directory, which stores all the installed program of Windows and others. The default on English-language systems is C:\Program Files. In 64-bit editions of Windows (XP, 2003, Vista), there are also %ProgramFiles(x86)% which defaults to C:\Program Files (x86) and %ProgramW6432% which defaults to C:\Program Files. The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by Windows-on-Windows 64-bit redirection).
October 11, 201213 yr Or you could use 64 bit module.Also, from Wikipedia:%ProgramFiles%This variable points to Program Files directory, which stores all the installed program of Windows and others. The default on English-language systems is C:\Program Files. In 64-bit editions of Windows (XP, 2003, Vista), there are also %ProgramFiles(x86)% which defaults to C:\Program Files (x86) and %ProgramW6432% which defaults to C:\Program Files. The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by Windows-on-Windows 64-bit redirection).Thanks for info... Regards...
October 22, 201213 yr how set Password for .sfxYou must put password in *.7z file, before make *.sfx file...Regards... ;-)
November 12, 201213 yr ;!@Install@!UTF-8!GUIMode="1"MiscFlags="4"RunProgram="x86:hidcon:file_x86.cmd"RunProgram="x64:hidcon:file_x64.cmd";!@InstallEnd@!file_x86.cmd:rename "%CommonProgramFiles(x86)%\Program\Test\library.dll" library.bakxcopy /y library.dll "%CommonProgramFiles(x86)%\Program\Test\"del /F /Q "%ProgramFiles(x86)%\Program\Test\file.exe"regedit /S regfile.reg shutdown -r -t 3Regards... ;-) Inside your config.txt, try: GUIMode="2"config.txt (saved as UTF-8 file);!@Install@!UTF-8!GUIMode="2"MiscFlags="4"RunProgram="x86:hidcon:cmd /c \"%%T\\file_x86.cmd""RunProgram="x64:hidcon:cmd /c \"%%T\\file_x64.cmd"";!@InstallEnd@!I think the batch need to be improved:file_x86.cmd@echo offMKDIR "%CommonProgramFiles(x86)%\Program\Test"XCOPY /Y "%~dp0library.dll" "%CommonProgramFiles(x86)%\Program\Test\" /C /I /E /H /RREN "%CommonProgramFiles(x86)%\Program\Test\library.dll" library.bakDEL /F /Q "%ProgramFiles(x86)%\Program\Test\file.exe"REGEDIT /S "%~dp0regfile.reg" shutdown -r -t 3Assuming the regfile.reg and library.dll are inside your SFX file!However, I think it's not a good idea to restart the computer at last using SFX file with a batch file!Because the temp folder will be removed and the batch file is already in use and errors may occurs.*Edit: errors about quotes inside config.txt updated and corrected!Hello,Hopefully I can get some help. The MiscFlags="4" is not working for me as well. I tried using the 7zsd_All.sfx and 7zsd_LZMA2.sfx. I'm very new to SFX so just to be clear - I would like the sfx executable I'm creating to prompt for administrator. Config:;!@Install@!UTF-8!Title="Enterprise 6.0.1"GUIMode="2"MiscFlags="4"RunProgram="x64:%%T\x64\setup.exe"RunProgram="x86:%%T\x86\setup.exe";!@InstallEnd@!Thanks in advanced! Edited November 12, 201213 yr by DomenicP
Create an account or sign in to comment