a06lp Posted December 15, 2004 Posted December 15, 2004 (edited) Ok, so SFX archives are obviously very useful, especially for Unattended Installs.Ergo (I love that word), i posted all of the commands and what each parameter of the command does.Lots of info here is from the WinRAR help/I'll try to keep this first post updated with all the commands known.Basic SFX Info:Using WinRAR you can create GUI (graphic mode) self-extracting archives for 32-bit Windows version (Windows 95, 98, NT and so on). [These modules cannot be executed under Windows 3.1 or DOS.]Both these modules support simple setup commands. You may put them to the SFX archive comment. Setup commands are listed below.;The comment below contains SFX script commandsThis is needed at the beginning of every comment section of the SFX.Delete=[filename]Delete the specified file in the destination folder before extraction. Several Delete commands are allowed.If a file specified in the Delete command is locked and cannot be deleted, SFX module will try to rename it to temporary name before extraction and delete after Windows reboot. Success of this operation depends on Windows version.Examples:Delete=winrar95.exeDelete=rarlng.dllLicense=[title of the license dialog]{license text1license text2…}Display the software license when starting SFX. User may either accept it and continue extraction or decline and quit.License may be either in HTML or plain text format. In the latter case SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.Examples:License=End user license agreement{All copyrights to RAR are exclusively owned by the author.This program is shareware. Anyone may use this software during a test period.Following this test period, you MUST register.}Path=[your path here]Where to install the files contained in the SFX.Examples:Path=%systemdrive%\WINDOWS\System32This installs to System32 in the Windows folder.Path=AIMThis installs to Program Files\AIM.Path=Calc 3.05Set the default path to "Program Files\Calc 3.05":Path=C:\CalcSet the default path to "C:\Calc":Path=.\CalcSet "Calc" folder without any preceding text as the default path:Presetup=[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.Examples:Presetup=uninstall.exe /cleanRuns "uninstall.exe" before setup/extraction.SavePathThis command allows SFX to store the destination path entered by user to Registry and then restore it when SFX archive with the same parameter of Path command executed the next time. The original value of Path command is placed to the list associated with the destination path input field, so a user may choose between previously entered and original paths.This feature may be convenient when installing new versions or upgrades of some software to the same folder. It allows to change the proposed path to desired only once instead of retyping it every time.SavePath command may be used only in combination with Path command.Examples:Path=Calc 3.05SavePathTempMode=[Question][,Title]This command forces SFX to create a temporary folder, extract all files to it, start the program specified in Setup command and remove the temporary folder including all its contents after completing the Setup program. The SFX automatically sets the silent mode to skip the the start dialog when performing these operations. If TempMode command is present, a script should also have Setup command and must not include Path command.TempMode command may have the optional string parameter, which is used to define a question and question title displayed before extraction. In such case extraction is started only if user selects "Yes" button.Examples:TempModeUnpacks to temp folder.TempMode=Do you wish to continue installation of Calculator 3.05?, Calculator setupCreates temp folder, and displays dialog with text "Do you wish to continue installation of Calculator 3.05?"Setup=[program]SFX will try to execute <program> after successful extraction. The folder containing extracted files is set as the current before executing [program]. If a program name contains spaces, it must be enclosed in quotes.Notes:1) If you have problems to use SFX to run InstallShield setup.exe, try to execute "setup.exe /SMS" instead of simple "setup.exe". This switch allows SFX to detect termination of the InstallShield setup program.2) All switches specified in SFX command line are passed to a program from Setup=<program> command. SFX itself understands only -s switch, which forces the silent install mode without displaying the start dialog.3) SFX module sets sfxname environment variable before running the setup program. This variable contains the name of SFX archive, so setup program can read it if it needs such information.Examples:Setup=setup.exeSFX will try to run "setup.exe".Silent=Xwhere X can be:1=Start dialog is completely hidden, including the progress bar and file names.2=Confirmation to start extracting is skipped, but users still see performing of the archive unpacking.This is the setting for what you want displayed on the screen.Examples:Silent=2This displays the unzipping box, but no pop-up messages.Text=[string]orText{string1string2…}This adds the specified plain text or HTML strings to the text output window of SFX module. When SFX module encounters Text command the first time, it resets the default contents of this window before adding [string]. Following commands append [string] to the already existing text.Depending on the used syntax this command may add either a single string or several strings at once.In case of plain text contents SFX module merges and reformats the specified text strings to fit them optimally into the dialog. So if you wish to start a new paragraph, you need to put the empty string before it.Using HTML you may control colors, fonts and formatting of displayed text. Description of HTML syntax is available on The World Wide Web Consortium site. Also it is possible to use any web page editor program to prepare HTML text.Examples:Text=Here is my new programAdd the single string to the dialog windowText{ Most interesting features of this program are:- support of the Windows Clipboard;- processing of files up to 10KB size each;}Add the specified text to the dialog windowOverwrite=Xwhere X can be:0=User will be asked before overwriting files1=Overwrite the file if it exists without confirmation2=All existing files will not be overwrittenThis is the setting for whether the SFX should overwrite the file if it exists.Examples:Overwrite=1This means: YES, overwrite.Shortcut=X, "PATHTOPROGRAM", "SUBMENU", "DESCRIPTION", "SHORTCUTNAME"where X can be:D=DesktopS=Start MenuP=Start Menu/ProgramsT=StartupThis one makes a shortcut. Replace the variables with real onesAlso, if there is some way to install shortcuts to locations other than the ones I have listed, please let me know.Examples:Shortcut=P, "mplayerc.exe", "Media Player", "Media Player Classic v6.4.8.2", "Media Player Classic"This creates a shortcut to the mplayerc.exe file in the SFX (no matter where it is installed to), in Start -> Programs -> Media Player. The shortcut tooltop (when you move your mouse over it) displays Media Player Classic v6.4.8.2, and the shortcut itself is named Media Player Classic.Shortcut=P, "mplayerc.exe", "", "Media Player Classic v6.4.8.2", "Media Player Classic"This creates a shortcut to the mplayerc.exe file in the SFX (no matter where it is installed to), in Start -> Programs. The shortcut tooltop (when you move your mouse over it) displays Media Player Classic v6.4.8.2, and the shortcut itself is named Media Player Classic.Title=[title]Set a title of SFX window.Examples:Title=Calculator, version 3.05;The comment below contains SFX script commandsPath=%systemdrive%\WINDOWS\System32SavePathSilent=1Overwrite=1Shortcut=P, "mplayerc.exe", "", "Media Player Classic v6.4.8.2", "Media Player Classic" Edited December 16, 2004 by a06lp
totoymola Posted December 16, 2004 Posted December 16, 2004 I have a question about the comments. The comments of the original WinRAR installer from the web (which is an sfx) is this.; WinRAR; Multifunctional Integrated Archive ManagerWhat is that? How do you make an sfx like the original installer?
durex Posted December 16, 2004 Posted December 16, 2004 Open WinRar > Help topics > Self-extacting modules > GUI RAR and ZIP SFX modules.... voila! All the commands at yr fingertips.
a06lp Posted December 16, 2004 Author Posted December 16, 2004 @totoymolaThose don't really matter (i think...) because they are commented out. Meaning, they have a ";" in the beginning of the line.@AstalavistaThanks, and your icon freaks me out.@durexCrap.Well, i either totally wasted my time, or helped a few people...Either way, i added the rest of the commands from the help file to the top post.
durex Posted December 16, 2004 Posted December 16, 2004 I dont think it was a waste of time... for people who are already searching around the forums its a great reference thread. nice work.
totoymola Posted December 16, 2004 Posted December 16, 2004 @totoymolaThose don't really matter (i think...) because they are commented out. Meaning, they have a ";" in the beginning of the line.I know. The question is, how do you hide the REAL comments like the installer of WinRAR itself. If you make an sfx that runs a file after extraction, your comments will have something like "Setup=whatever", right? But if you open the original installer of WinRAR with WinRAR, you will not see that comment.
Astalavista Posted December 16, 2004 Posted December 16, 2004 here is a picture guide on how to setup winrar default settings.should be useful to the newbies. http://ezshare.de/files-en/183815/My_Documents.rar.html
a06lp Posted December 16, 2004 Author Posted December 16, 2004 I know. The question is, how do you hide the REAL comments like the installer of WinRAR itself. If you make an sfx that runs a file after extraction, your comments will have something like "Setup=whatever", right? But if you open the original installer of WinRAR with WinRAR, you will not see that comment.is the WinRAR installer an SFX? i dont think so, because i use the "/s" switch to install it...you cant use "/s" with SFX's
totoymola Posted December 16, 2004 Posted December 16, 2004 is the WinRAR installer an SFX?Yes, it is. you cant use "/s" with SFX'sYes, you can.
durex Posted December 16, 2004 Posted December 16, 2004 here is a picture guide on how to setup winrar default settings.should be useful to the newbies. http://ezshare.de/files-en/183815/My_Documents.rar.htmlbad link
Astalavista Posted December 16, 2004 Posted December 16, 2004 is the WinRAR installer an SFX?Yes, it is. you cant use "/s" with SFX'sYes, you can. take your winrar installerright click with wirnar select open with winrarit is a sfx hehehehehe;The comment below contains SFX script commandsPath=WinRARSavePathSetup=uninstall.exe /setupPresetup=uninstall.exe /cleanOverwrite=1Delete=*.lngDelete=rarlng.dllDelete=rarext.dllDelete=register.frmDelete=rar_site.txtDelete=register.txtDelete=order.txtDelete=Dos.sfxDelete=os2.sfxDelete=Formats\ace.fmtDelete=Formats\arj.fmtDelete=Formats\cab.fmtDelete=Formats\gz.fmtDelete=Formats\lzh.fmtDelete=Formats\tar.fmtDelete=Formats\uue.fmtDelete=Formats\bz2.fmtDelete=Formats\iso.fmtDelete=Formats\unacev2.dllDelete=Formats\7z.fmtDelete=Formats\7za.dllDelete=Formats\z.fmtTitle=WinRAR v3.41 Corporate EditionText{ This is a REAL Corporate version. <html> <body bgcolor="#ececec"> <style> body { color: #000000; background-color: #ffffff; font-family: "MS Sans Serif"; font-size: 12; scrollbar-3dlight-color:#f0f0f0; scrollbar-arrow-color:#f0f0f0; scrollbar-darkshadow-color:#909090; scrollbar-face-color:#909090; scrollbar-highlight-color:#f0f0f0; scrollbar-shadow-color:#f0f0f0 } em {color: navy; font-style: normal} </style> <b>WinRAR is a powerful archiver</b>. It provides complete support of <em><b>RAR</b></em> and <em><b>ZIP</b></em> files, unpacks <em>7Z</em>, <em>ACE</em>, <em>ARJ</em>, <em>BZ2</em>, <em>CAB</em>, <em>GZ</em>, <em>ISO</em>, <em>JAR</em>, <em>LZH</em>, <em>TAR</em>, <em>UUE</em>, <em>Z</em>. Among WinRAR features are strong compression, volumes, encryption, self-extracting modules, backup facilities.<br><br> <b>WinRAR is shareware</b>. Anyone may use it during a test period of 40 days. Following this test period or less, if you wish to continue to use WinRAR, you must register.<br><br> <b>There are no additional license fees</b>, apart from the cost of registration, associated with the creation and distribution of RAR archives or self-extracting archives. Legally registered owners may use their copies of WinRAR to produce and distribute those archives free of any additional RAR royalties.<br><br> <b>WinRAR archiver is distributed as is</b>.No warranty of any kind is expressed or implied. You use at yourown risk. Neither the author nor the agents of the author will beliable for data loss, damages, loss of profits or any other kindof loss while using or misusing this software. </body> </html>}
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now