12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233 |
- <?xml version="1.0" standalone="yes" ?>
- <isxhelp version="1.0">
- <copyright>
- Inno Setup
- Copyright (C) 1997-2024 Jordan Russell
- Portions by Martijn Laan
- For conditions of distribution and use, see LICENSE.TXT.
- </copyright>
- <isxfunc>
- <category>
- <description>Setup or Uninstall Info</description>
- <subcategory>
- <function>
- <name>GetCmdTail</name>
- <prototype>function GetCmdTail: String;</prototype>
- <description><p>Returns all command line parameters passed to Setup or Uninstall as a single string, including undocumented internal parameters used by Setup and Uninstall.</p></description>
- <seealso><p><link topic="isxfunc_ParamStr">ParamStr</link></p></seealso>
- </function>
- <function>
- <name>ParamCount</name>
- <prototype>function ParamCount: Integer;</prototype>
- <description><p>Returns the number of command line parameters passed to Setup or Uninstall, excluding undocumented internal parameters used by Setup and Uninstall.</p></description>
- <seealso><p><link topic="isxfunc_ParamStr">ParamStr</link><br />
- <link topic="isxfunc_GetCmdTail">GetCmdTail</link></p></seealso>
- </function>
- <function>
- <name>ParamStr</name>
- <prototype>function ParamStr(Index: Integer): String;</prototype>
- <description><p>Returns the Index-th command line parameter passed to Setup or Uninstall, excluding undocumented internal parameters used by Setup and Uninstall.</p>
- <p>Parameter number zero is the full file name with which Setup or Uninstall was started.</p>
- <p>If Index is invalid, ParamStr returns an empty string.</p></description>
- <seealso><p><link topic="isxfunc_ParamCount">ParamCount</link><br />
- <link topic="isxfunc_GetCmdTail">GetCmdTail</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>ActiveLanguage</name>
- <prototype>function ActiveLanguage: String;</prototype>
- <description><p>Returns the name of the active language.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CustomMessage</name>
- <prototype>function CustomMessage(const MsgName: String): String;</prototype>
- <description><p>Returns the value of the [CustomMessages] entry with the specified name. If an entry with the specified name does not exist, an exception will be raised.</p></description>
- <example><pre>var
- S: String;
- begin
- S := CustomMessage('CreateDesktopIcon');
- // S = 'Create a &desktop icon'
- S := FmtMessage(CustomMessage('NameAndVersion'), ['My Program', '1.0']);
- // S = 'My Program version 1.0'
- end;</pre></example>
- </function>
- <function>
- <name>FmtMessage</name>
- <prototype>function FmtMessage(const S: String; const Args: array of String): String;</prototype>
- <description><p>Formats the string S using the specified string arguments. A <tt>%1</tt> in the format string will be replaced with the first value in the Args array; a <tt>%2</tt> will be replaced with the second value; and so on. <tt>%%</tt> will be replaced with <tt>%</tt>.</p></description>
- <remarks><p>If a <tt>%</tt>-specifier references a non-existing argument, it will be returned untouched. No exception will be raised.</p></remarks>
- <example><pre>var
- S: String;
- begin
- S := FmtMessage('%1 version %2 will be installed.', ['My Program', '1.0']);
- // S = 'My Program version 1.0 will be installed.'
- S := FmtMessage(SetupMessage(msgNotOnThisPlatform), ['Windows 2000']);
- // S = 'This program will not run on Windows 2000.'
- end;</pre></example>
- </function>
- <function>
- <name>SetupMessage</name>
- <prototype>function SetupMessage(const ID: TSetupMessageID): String;</prototype>
- <description><p>Returns the value of the specified message.</p>
- <p>TSetupMessageID is defined as:</p>
- <p>'msg' + the message name. Example: <i>SetupMessage(msgSetupAppTitle)</i></p></description>
- <example><pre>var
- S: String;
- begin
- S := SetupMessage(msgButtonNext);
- // S now equals '&Next >'
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>WizardDirValue</name>
- <prototype>function WizardDirValue: String;</prototype>
- <description><p>Returns the current contents of the edit control on the <i>Select Destination Location</i> page of the wizard.</p>
- <p>Unlike <tt>ExpandConstant('{app}')</tt>, this function will not fail if called after the wizard is shown but prior to the user selecting a directory. Rather, it will return the default directory name.</p></description>
- </function>
- <function>
- <name>WizardGroupValue</name>
- <prototype>function WizardGroupValue: String;</prototype>
- <description><p>Returns the current contents of the edit control on the <i>Select Start Menu Folder</i> page of the wizard.</p>
- <p>Unlike <tt>ExpandConstant('{group}')</tt>, this function will not fail if called after the wizard is shown but prior to the user selecting a folder. Rather, it will return the default folder name.</p></description>
- </function>
- <function>
- <name>WizardNoIcons</name>
- <prototype>function WizardNoIcons: Boolean;</prototype>
- <description><p>Returns the current setting of the <i>Don't create a Start Menu folder</i> check box on the <i>Select Start Menu Folder</i> page of the wizard.</p></description>
- </function>
- <function>
- <name>WizardSetupType</name>
- <prototype>function WizardSetupType(const Description: Boolean): String;</prototype>
- <description><p>Returns the name or description of the setup type selected by the user.</p></description>
- </function>
- <function>
- <name>WizardSelectedComponents</name>
- <prototype>function WizardSelectedComponents(const Descriptions: Boolean): String;</prototype>
- <description><p>Returns a comma-separated list of names or descriptions of the components selected by the user.</p></description>
- <seealso><p><link topic="isxfunc_WizardIsComponentSelected">WizardIsComponentSelected</link><br />
- <link topic="isxfunc_WizardSelectComponents">WizardSelectComponents</link></p></seealso>
- </function>
- <function>
- <name>WizardIsComponentSelected</name>
- <prototype>function WizardIsComponentSelected(const Components: String): Boolean;</prototype>
- <description><p>Returns True if the specified component is selected. Multiple components may be specified in the same manner as in a <link topic="componentstasksparams" window="main">Components parameter</link>.</p></description>
- <seealso><p><link topic="isxfunc_WizardSelectedComponents">WizardSelectedComponents</link><br />
- <link topic="isxfunc_WizardSelectComponents">WizardSelectComponents</link></p></seealso>
- <example><pre>begin
- if WizardIsComponentSelected('helpfiles') then
- // the 'helpfiles' component is selected
- end;</pre></example>
- </function>
- <function>
- <name>WizardSelectComponents</name>
- <prototype>procedure WizardSelectComponents(const Components: String);</prototype>
- <description><p>Selects the specified comma separated list of component names.</p>
- <p>If a component name is prefixed with a "*" character, any child components will be selected as well (except for those that include the <tt>dontinheritcheck</tt> flag). If a component name is prefixed with a "!" character, the component will be deselected.</p>
- <p>This function does not change the state of unspecified components. This function can change the state of specified components that include the <tt>fixed</tt> flag.</p>
- </description>
- <seealso><p><link topic="isxfunc_WizardSelectedComponents">WizardSelectedComponents</link><br />
- <link topic="isxfunc_WizardIsComponentSelected">WizardIsComponentSelected</link></p></seealso>
- <example><pre>begin
- WizardSelectComponents('!helpfiles');
- // the 'helpfiles' component is deselected
- end;</pre></example>
- </function>
- <function>
- <name>WizardSelectedTasks</name>
- <prototype>function WizardSelectedTasks(const Descriptions: Boolean): String;</prototype>
- <description><p>Returns a comma-separated list of names or descriptions of the tasks selected by the user.</p></description>
- <seealso><p><link topic="isxfunc_WizardIsTaskSelected">WizardIsTaskSelected</link><br />
- <link topic="isxfunc_WizardSelectTasks">WizardSelectTasks</link></p></seealso>
- </function>
- <function>
- <name>WizardIsTaskSelected</name>
- <prototype>function WizardIsTaskSelected(const Tasks: String): Boolean;</prototype>
- <description><p>Returns True if the specified task is selected. Multiple tasks may be specified in the same manner as in a <link topic="componentstasksparams" window="main">Tasks parameter</link>.</p></description>
- <seealso><p><link topic="isxfunc_WizardSelectedTasks">WizardSelectedTasks</link><br />
- <link topic="isxfunc_WizardSelectTasks">WizardSelectTasks</link></p></seealso>
- <example><pre>begin
- if WizardIsTaskSelected('desktopicon') then
- // the 'desktopicon' task is selected
- end;</pre></example>
- </function>
- <function>
- <name>WizardSelectTasks</name>
- <prototype>procedure WizardSelectTasks(const Tasks: String);</prototype>
- <description><p>Selects the specified comma separated list of task names.</p>
- <p>If a task name is prefixed with a "!" character, the task will be deselected.</p>
- <p>This function does not change the state of unspecified tasks.</p>
- </description>
- <seealso><p><link topic="isxfunc_WizardSelectedTasks">WizardSelectedTasks</link><br />
- <link topic="isxfunc_WizardIsTaskSelected">WizardIsTaskSelected</link></p></seealso>
- <example><pre>begin
- WizardSelectTasks('!desktopicon');
- // the 'desktopicon' task is deselected
- end;</pre></example>
- </function>
- <function>
- <name>WizardSilent</name>
- <prototype>function WizardSilent: Boolean;</prototype>
- <description><p>Returns True if Setup is running silently, False otherwise.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>IsUninstaller</name>
- <prototype>function IsUninstaller: Boolean;</prototype>
- <description><p>Returns True if Uninstall is running as opposed to Setup, False otherwise.</p></description>
- </function>
- <function>
- <name>UninstallSilent</name>
- <prototype>function UninstallSilent: Boolean;</prototype>
- <description><p>Returns True if Uninstall is running silently, False otherwise.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CurrentFilename</name>
- <prototype>function CurrentFilename: String;</prototype>
- <description><p>Returns the destination file name of the [Files] entry that is currently being processed. The returned name may include constants.</p>
- <p>Do not attempt to call this function from outside a Check, BeforeInstall or AfterInstall event function belonging to a [Files] entry.</p></description>
- </function>
- <function>
- <name>CurrentSourceFilename</name>
- <prototype>function CurrentSourceFilename: String;</prototype>
- <description><p>Returns the source file name of the [Files] entry that is currently being processed. The returned name may include constants.</p>
- <p>Do not attempt to call this function from outside a Check, BeforeInstall or AfterInstall event function belonging to a [Files] entry with the "external" flag.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>ExpandConstant</name>
- <prototype>function ExpandConstant(const S: String): String;</prototype>
- <description><p>Changes all constants in S to their values. For example, ExpandConstant('{srcexe}') is changed to the filename of Setup.</p>
- <p>An exception will be raised if there was an error expanding the constants.</p></description>
- </function>
- <function>
- <name>ExpandConstantEx</name>
- <prototype>function ExpandConstantEx(const S: String; const CustomConst, CustomValue: String): String;</prototype>
- <description><p>Changes all constants in S to their values. Additionally, any constant equal to CustomConst will be changed to CustomValue.</p>
- <p>An exception will be raised if there was an error expanding the constants.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetPreviousData</name>
- <prototype>function GetPreviousData(const ValueName, DefaultValueData: String): String;</prototype>
- <description><p>Gets a value that was previously stored using SetPreviousData.</p></description>
- </function>
- <function>
- <name>SetPreviousData</name>
- <prototype>function SetPreviousData(const PreviousDataKey: Integer; const ValueName, ValueData: String): Boolean;</prototype>
- <description><p>Sets a value that can be restored later using GetPreviousData. Call SetPreviousData inside a RegisterPreviousData event function, once per setting.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>Terminated</name>
- <prototype>function Terminated: Boolean;</prototype>
- <description><p>Returns True if Setup or Uninstall is terminating, False otherwise.</p></description>
- </function>
- <function>
- <name>Debugging</name>
- <prototype>function Debugging: Boolean;</prototype>
- <description><p>Returns True if Setup or Uninstall is being debugged by the Compiler IDE or another application, False otherwise.</p></description>
- <seealso><p><link topic="scriptdebug">Run-time debugger</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>RegisterExtraCloseApplicationsResource</name>
- <prototype>function RegisterExtraCloseApplicationsResource(const DisableFsRedir: Boolean; const AFilename: String): Boolean;</prototype>
- <description><p>Register an extra file which Setup should check for being in-use. Call RegisterExtraCloseApplicationsResource inside a RegisterExtraCloseApplicationsResources event function, once per file. Ignores <link topic="setup_closeapplicationsfilter">CloseApplicationsFilter</link>. Returns True if successful.</p></description>
- </function>
- <function>
- <name>RmSessionStarted</name>
- <prototype>function RmSessionStarted: Boolean;</prototype>
- <description><p>Returns True if a Restart Manager session was started, False otherwise.</p></description>
- <seealso><p><link topic="setup_closeapplications">CloseApplications</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetWizardForm</name>
- <prototype>function GetWizardForm: TWizardForm;</prototype>
- <description><p>Returns the <tt>WizardForm</tt> support object, or raises an internal error if the object has not yet been created.</p></description>
- <seealso><p><link topic="scriptclasses" anchor="WizardForm">WizardForm</link></p></seealso>
- </function>
- <function>
- <name>GetUninstallProgressForm</name>
- <prototype>function GetUninstallProgressForm: TUninstallProgressForm;</prototype>
- <description><p>Returns the <tt>UninstallProgressForm</tt> support object, or raises an internal error if the object has not yet been created.</p></description>
- <seealso><p><link topic="scriptclasses" anchor="UninstallProgressForm">UninstallProgressForm</link></p></seealso>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Exception</description>
- <subcategory>
- <function>
- <name>Abort</name>
- <prototype>procedure Abort;</prototype>
- <description><p>Escapes from the current execution path without reporting an error.</p>
- <p>Abort raises a special "silent exception" which operates like any other exception, but does not display an error message to the end user.</p></description>
- <remarks><p>Abort does not cause Setup or Uninstall to exit unless it's called from one of these event functions (or another function invoked by them):</p>
- <p><tt>InitializeSetup<br />
- InitializeWizard<br />
- CurStepChanged(ssInstall)</tt></p>
- <p><tt>InitializeUninstall<br />
- CurUninstallStepChanged(usAppMutexCheck)<br />
- CurUninstallStepChanged(usUninstall)</tt></p></remarks>
- <seealso><p><link topic="scriptevents" anchor="PrepareToInstall">PrepareToInstall</link></p></seealso>
- </function>
- <function>
- <name>RaiseException</name>
- <prototype>procedure RaiseException(const Msg: String);</prototype>
- <description><p>Raises an exception with the specified message.</p></description>
- <example><pre>begin
- RaiseException('Your message goes here');
- // The following line will not be executed because of the exception
- MsgBox('You will not see this.', mbInformation, MB_OK);
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetExceptionMessage</name>
- <prototype>function GetExceptionMessage: String;</prototype>
- <description><p>Returns the message associated with the current exception. This function should only be called from within an <tt>except</tt> section, or a function called from an <tt>except</tt> section.</p></description>
- <remarks><p>Exception messages generally do not end in a period. Pass the result of this function to AddPeriod to add one.</p></remarks>
- <example><pre>var
- I: Integer;
- begin
- I := 1;
- try
- // The following line will raise a "Division by zero" exception
- I := I div 0;
- except
- // Catch the exception, deal with it, and continue
- MsgBox('We caught this exception: ' + AddPeriod(GetExceptionMessage),
- mbError, MB_OK);
- end;
- end;</pre></example>
- </function>
- <function>
- <name>ShowExceptionMessage</name>
- <prototype>procedure ShowExceptionMessage;</prototype>
- <description><p>Shows the message associated with the current exception in a message box. This function should only be called from within an <tt>except</tt> section, or a function called from an <tt>except</tt> section.</p></description>
- <remarks><p>If logging is enabled (via the <link topic="setupcmdline">/LOG</link> command line parameter or the <link topic="setup_setuplogging">SetupLogging</link> [Setup] section directive or the <link topic="setup_uninstalllogging">UninstallLogging</link> [Setup] section directive or debugging from the Compiler IDE) the message will be recorded in the log file and/or in the Compiler IDE's "Debug Output" view in addition to being shown.</p></remarks>
- <example><pre>var
- I: Integer;
- begin
- I := 1;
- try
- // The following line will raise a "Division by zero" exception
- I := I div 0;
- except
- // Catch the exception, show it, and continue
- ShowExceptionMessage;
- end;
- end;</pre></example>
- </function>
- </subcategory>
- </category>
- <category>
- <description>System</description>
- <subcategory>
- <function>
- <name>IsAdmin</name>
- <prototype>function IsAdmin: Boolean;</prototype>
- <description><p>Returns True if Setup/Uninstall is running with administrative privileges.</p></description>
- </function>
- <function>
- <name>IsAdminInstallMode</name>
- <prototype>function IsAdminInstallMode: Boolean;</prototype>
- <description><p>Returns True if Setup is running in <link topic="admininstallmode">administrative install mode</link> or if Uninstall is running with administrative privileges.</p></description>
- </function>
- <function>
- <name>GetWindowsVersion</name>
- <prototype>function GetWindowsVersion: Cardinal;</prototype>
- <description><p>Returns the version number of Windows packed into a single integer. The upper 8 bits specify the major version; the following 8 bits specify the minor version; the lower 16 bits specify the build number. For example, this function will return $0A002800 on Windows 10 Version 1507, which is version 10.0.10240.</p>
- <p>To retrieve just the major version number, use: "GetWindowsVersion shr 24". To retrieve just the minor version number, use: "(GetWindowsVersion shr 16) and $FF". To retrieve just the build number, use: "GetWindowsVersion and $FFFF".</p></description>
- <example><pre>function IsWindows8OrLater: Boolean;
- begin
- Result := (GetWindowsVersion >= $06020000);
- end;</pre></example>
- <seealso><p><link topic="isxfunc_GetWindowsVersionEx">GetWindowsVersionEx</link></p></seealso>
- </function>
- <function>
- <name>GetWindowsVersionEx</name>
- <prototype>procedure GetWindowsVersionEx(var Version: TWindowsVersion);</prototype>
- <description><p>Returns extended information about the version of Windows in a record.</p>
- <p>TWindowsVersion is defined as:</p>
- <pre>
- TWindowsVersion = record
- Major: Cardinal; // Major version number
- Minor: Cardinal; // Minor version number
- Build: Cardinal; // Build number
- ServicePackMajor: Cardinal; // Major version number of service pack
- ServicePackMinor: Cardinal; // Minor version number of service pack
- NTPlatform: Boolean; // True if an NT-based platform
- ProductType: Byte; // Product type (see below)
- SuiteMask: Word; // Product suites installed (see below)
- end;
- </pre>
- <p>The ProductType field can be one of the following values:</p>
- <pre>
- VER_NT_WORKSTATION
- VER_NT_DOMAIN_CONTROLLER
- VER_NT_SERVER
- </pre>
- <p>It can also be zero if the product type could not be determined (unlikely). VER_NT_WORKSTATION indicates a non-server edition of Windows (e.g. Workstation, Professional, or Home).</p>
- <p>The SuiteMask field can be a combination of the following values:</p>
- <pre>
- VER_SUITE_BACKOFFICE
- VER_SUITE_BLADE
- VER_SUITE_DATACENTER
- VER_SUITE_ENTERPRISE
- VER_SUITE_EMBEDDEDNT
- VER_SUITE_PERSONAL
- VER_SUITE_SINGLEUSERTS
- VER_SUITE_SMALLBUSINESS
- VER_SUITE_SMALLBUSINESS_RESTRICTED
- VER_SUITE_TERMINAL
- </pre>
- <p>VER_SUITE_PERSONAL, for example, is set on Home edition of Windows XP, and VER_SUITE_BLADE is set on the Web edition of Windows Server 2003.</p></description>
- <example><p>The following example demonstrates how you can disallow installation on certain editions of Windows, and check service pack levels on multiple operating system versions. (Neither of these things are possible with the <tt>MinVersion</tt> [Setup] section directive.)</p>
- <pre>function InitializeSetup: Boolean;
- var
- Version: TWindowsVersion;
- S: String;
- begin
- GetWindowsVersionEx(Version);
- // Disallow installation on Home edition of Windows
- if Version.SuiteMask and VER_SUITE_PERSONAL <> 0 then
- begin
- SuppressibleMsgBox('This program cannot be installed on a Home edition of Windows.',
- mbCriticalError, MB_OK, IDOK);
- Result := False;
- Exit;
- end;
- // Disallow installation on domain controllers
- if Version.ProductType = VER_NT_DOMAIN_CONTROLLER then
- begin
- SuppressibleMsgBox('This program cannot be installed on domain controllers.',
- mbCriticalError, MB_OK, IDOK);
- Result := False;
- Exit;
- end;
- Result := True;
- end;</pre></example>
- </function>
- <function>
- <name>GetWindowsVersionString</name>
- <prototype>function GetWindowsVersionString: String;</prototype>
- <description><p>Returns the version number of Windows in string form. On Windows 2000, for example, this function will return "5.00.2195".</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>IsWin64</name>
- <prototype>function IsWin64: Boolean;</prototype>
- <description><p>Returns True if the system is running a 64-bit version of Windows. If False is returned, you cannot utilize any of Inno Setup's 64-bit-only features.</p>
- <p>Another way to describe this function is: Returns True if the system matches architecture identifier <link topic="archidentifiers">win64</link>.</p>
- <p>Do not use this function to detect <link topic="32vs64bitinstalls">64-bit install mode</link>, use <link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link> instead.</p></description>
- <example><pre>begin
- // Check IsWin64 before using a 64-bit-only feature to
- // avoid an exception when running on 32-bit Windows.
- if IsWin64 then
- begin
- MsgBox('64-bit program files reside in: ' +
- ExpandConstant('{autopf64}'), mbInformation, MB_OK);
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- <function>
- <name>Is64BitInstallMode</name>
- <prototype>function Is64BitInstallMode: Boolean;</prototype>
- <description><p>Returns True if Setup or Uninstall is running in <link topic="32vs64bitinstalls">64-bit install mode</link>, or False if it is running in <link topic="32vs64bitinstalls">32-bit install mode</link>.</p></description>
- <remarks><p>When True is returned, it is safe to assume that <link topic="isxfunc_IsWin64">IsWin64</link> will also return True.</p></remarks>
- <example><pre>begin
- if Is64BitInstallMode then
- MsgBox('Installing in 64-bit mode', mbInformation, MB_OK)
- else
- MsgBox('Installing in 32-bit mode', mbInformation, MB_OK);
- end;</pre></example>
- <seealso><p><link topic="isxfunc_IsWin64">IsWin64</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- <function>
- <name>ProcessorArchitecture</name>
- <prototype>function ProcessorArchitecture: TSetupProcessorArchitecture;</prototype>
- <description><p>Returns the architecture of the system's Windows installation.</p>
- <p><tt>TSetupProcessorArchitecture</tt> is an enumerated type, defined as:</p>
- <p><tt>TSetupProcessorArchitecture = (paUnknown, paX86, paX64, paArm32, paArm64);</tt></p></description>
- <remarks><p><tt>paUnknown</tt> is returned if Setup/Uninstall does not recognize the architecture of the Windows installation. It can be assumed that an "unknown" architecture is at least capable of executing 32-bit x86 code, or Setup/Uninstall wouldn't be running at all.</p>
- <p><tt>paArm32</tt> is not a possible return value for this function because no version of Windows for 32-bit Arm processors had the ability to run x86 binaries. (An x86 emulator was first introduced in Arm64 Windows.)</p></remarks>
- <example><pre>var
- S: String;
- begin
- case ProcessorArchitecture of
- paX86: S := 'x86';
- paX64: S := 'x64';
- paArm64: S := 'Arm64';
- else
- S := 'Unrecognized';
- end;
- MsgBox('Windows architecture: ' + S, mbInformation, MB_OK);
- end;</pre></example>
- <seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
- <link topic="isxfunc_Is64BitInstallMode">Is64BitInstallMode</link></p></seealso>
- </function>
- <function>
- <name>IsArm32Compatible</name>
- <prototype>function IsArm32Compatible: Boolean;</prototype>
- <description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">arm32compatible</link>.</p></description>
- <seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- <function>
- <name>IsArm64</name>
- <prototype>function IsArm64: Boolean;</prototype>
- <description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">arm64</link>.</p></description>
- <seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- <function>
- <name>IsX64Compatible</name>
- <prototype>function IsX64Compatible: Boolean;</prototype>
- <description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x64compatible</link>.</p></description>
- <seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- <function>
- <name>IsX64OS</name>
- <prototype>function IsX64OS: Boolean;</prototype>
- <description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x64os</link>.</p>
- <p>Before Inno Setup 6.3, <tt>IsX64OS</tt> was named <tt>IsX64</tt>. The compiler still accepts <tt>IsX64</tt> as an alias for <tt>IsX64OS</tt>, but will emit a deprecation warning when used.</p></description>
- <seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- <function>
- <name>IsX86Compatible</name>
- <prototype>function IsX86Compatible: Boolean;</prototype>
- <description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x86compatible</link>.</p></description>
- <seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- <function>
- <name>IsX86OS</name>
- <prototype>function IsX86OS: Boolean;</prototype>
- <description><p>Returns True if the system matches architecture identifier <link topic="archidentifiers">x86os</link>.</p>
- <p>Before Inno Setup 6.3, <tt>IsX86OS</tt> was named <tt>IsX86</tt>. The compiler still accepts <tt>IsX86</tt> as an alias for <tt>IsX86OS</tt>.</p></description>
- <seealso><p><link topic="isarchidentifier">Architecture Identifier Matchers like IsX64Compatible</link><br />
- <link topic="isxfunc_ProcessorArchitecture">ProcessorArchitecture</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>InstallOnThisVersion</name>
- <prototype>function InstallOnThisVersion(const MinVersion, OnlyBelowVersion: String): Boolean;</prototype>
- <description><p>This function is deprecated. Returns True if an entry with the specified MinVersion and OnlyBelowVersion parameters should be installed. If an invalid version string is passed, an exception will be raised.</p>
- <p>This function is provided for backward compatibility only, and may be removed in a future release. New scripts should use <link topic="isxfunc_GetWindowsVersion">GetWindowsVersion</link> or <link topic="isxfunc_GetWindowsVersionEx">GetWindowsVersionEx</link> instead.</p></description>
- <remarks><p>Prior to Inno Setup 5.5.0, this function returned <tt>irInstall</tt> rather than a Boolean True value. <tt>irInstall</tt> is now defined as an alias for True.</p></remarks>
- <example><pre>// Old method, deprecated
- function IsWindows8OrLater: Boolean;
- begin
- Result := InstallOnThisVersion('0,6.2', '0,0');
- end;
- // New method
- function IsWindows8OrLater: Boolean;
- begin
- Result := (GetWindowsVersion >= $06020000);
- end;</pre></example>
- <seealso><p><link topic="isxfunc_GetWindowsVersion">GetWindowsVersion</link><br />
- <link topic="isxfunc_GetWindowsVersionEx">GetWindowsVersionEx</link></p></seealso>
- </function>
- <function>
- <name>IsDotNetInstalled</name>
- <prototype>function IsDotNetInstalled(const MinVersion: TDotNetVersion; const MinServicePack: Cardinal): Boolean;</prototype>
- <description><p>Returns True if the .NET Framework with the specified MinVersion and MinServicePack parameters is installed.</p>
- <p>TDotNetVersion is defined as:</p>
- <p><tt>TDotNetVersion = (net11, net20, net30, net35, net4Client, net4Full, net45, net451, net452, net46, net461, net462, net47, net471, net472, net48, net481);</tt></p></description>
- <example><pre>function InitializeSetup: Boolean;
- begin
- Result := IsDotNetInstalled(net462, 0); //Returns True if .NET Framework version 4.6.2 is installed, or a compatible version such as 4.8.1
- if not Result then
- SuppressibleMsgBox(FmtMessage(SetupMessage(msgWinVersionTooLowError), ['.NET Framework', '4.6.2']), mbCriticalError, MB_OK, IDOK);
- end;</pre></example>
- </function>
- <function>
- <name>IsMsiProductInstalled</name>
- <prototype>function IsMsiProductInstalled(const UpgradeCode: String; const PackedMinVersion: Int64): Boolean;</prototype>
- <description><p>Returns True if a MSI product with the specified UpgradeCode and PackedMinVersion is installed.</p>
- <p>If there are multiple products installed with the specified UpgradeCode only the version of the first product returned by the system is checked.</p>
- <p>An exception will be raised if an error occurs.</p></description>
- <example><pre>function InitializeSetup: Boolean;
- begin
- Result := IsMsiProductInstalled('{20400CF0-DE7C-327E-9AE4-F0F38D9085F8}', PackVersionComponents(12, 0, 0, 0)); //Returns True if Visual C++ 2013 Redistributable (x64) is installed
- if not Result then
- SuppressibleMsgBox(FmtMessage(SetupMessage(msgWinVersionTooLowError), ['Visual C++ 2013 Redistributable (x64)', '12.0']), mbCriticalError, MB_OK, IDOK);
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetEnv</name>
- <prototype>function GetEnv(const EnvVar: String): String;</prototype>
- <description><p>Gets the value of the specified environment variable.</p></description>
- </function>
- <function>
- <name>GetUserNameString</name>
- <prototype>function GetUserNameString: String;</prototype>
- <description><p>Retrieves the name of the user currently logged onto the system.</p></description>
- </function>
- <function>
- <name>GetComputerNameString</name>
- <prototype>function GetComputerNameString: String;</prototype>
- <description><p>Retrieves the name of the computer the Setup or Uninstall program is running on (as returned by the Windows <i>GetComputerName</i> function).</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetUILanguage</name>
- <prototype>function GetUILanguage: Integer;</prototype>
- <description><p>Returns the language identifier (LANGID) of the current user's UI language, which is either the language of Windows itself, or in the case of a MUI edition of Windows, the user interface language chosen in Control Panel's Regional Options. Returns 0 if the function fails (unlikely).</p></description>
- <remarks><p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/dd318693.aspx">list of valid language identifiers on MSDN</a>.</p></remarks>
- <example><pre>begin
- if GetUILanguage = $0409 then
- begin
- // UI language is English (United States)
- end;
- // You can use "and $3FF" to extract the primary language identifier
- if GetUILanguage and $3FF = $09 then
- begin
- // Matches any variant of English
- end;
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>FontExists</name>
- <prototype>function FontExists(const FaceName: String): Boolean;</prototype>
- <description><p>Returns True if a font with the specified face name is installed on the system.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>FindWindowByClassName</name>
- <prototype>function FindWindowByClassName(const ClassName: String): HWND;</prototype>
- <description><p>Retrieves a handle to the top-level window whose class name matches the specified string. This function does not search child windows, and does not perform a case-sensitive search. Returns 0 if no window is found.</p></description>
- </function>
- <function>
- <name>FindWindowByWindowName</name>
- <prototype>function FindWindowByWindowName(const WindowName: String): HWND;</prototype>
- <description><p>Retrieves a handle to the top-level window whose window name matches the specified string. This function does not search child windows, and does not perform a case-sensitive search. Returns 0 if no window is found.</p></description>
- </function>
- <function>
- <name>SendMessage</name>
- <prototype>function SendMessage(const Wnd: HWND; const Msg, WParam, LParam: LongInt): LongInt;</prototype>
- <description><p>Sends the specified message to the specified window. Does not return until the window procedure has processed the message.</p></description>
- </function>
- <function>
- <name>PostMessage</name>
- <prototype>function PostMessage(const Wnd: HWND; const Msg, WParam, LParam: LongInt): Boolean;</prototype>
- <description><p>Posts the specified message to the specified window, returning immediately. Returns True if successful.</p></description>
- </function>
- <function>
- <name>SendNotifyMessage</name>
- <prototype>function SendNotifyMessage(const Wnd: HWND; const Msg, WParam, LParam: LongInt): Boolean;</prototype>
- <description><p>Sends the specified message to the specified window without waiting for the message to be processed by the destination window procedure. Returns True if successful.</p></description>
- </function>
- <function>
- <name>RegisterWindowMessage</name>
- <prototype>function RegisterWindowMessage(const Name: String): LongInt;</prototype>
- <description><p>The RegisterWindowMessage function defines a new window message that is guaranteed to be unique throughout the system. The returned message value can be used when calling the SendBroadcastMessage or PostBroadcastMessage function.</p></description>
- </function>
- <function>
- <name>SendBroadcastMessage</name>
- <prototype>function SendBroadcastMessage(const Msg, WParam, LParam: LongInt): LongInt;</prototype>
- <description><p>Sends the specified message to top-level windows in the system. Does not return until all window procedure have processed the message.<br />The specified message must be unique. Use RegisterWindowMessage to get such a message.</p></description>
- </function>
- <function>
- <name>PostBroadcastMessage</name>
- <prototype>function PostBroadcastMessage(const Msg, WParam, LParam: LongInt): Boolean;</prototype>
- <description><p>Posts the specified message to top-level windows in the system, returning immediately.<br />The specified message must be unique. Use RegisterWindowMessage to get such a message.</p></description>
- </function>
- <function>
- <name>SendBroadcastNotifyMessage</name>
- <prototype>function SendBroadcastNotifyMessage(const Msg, WParam, LParam: LongInt): Boolean;</prototype>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CreateMutex</name>
- <prototype>procedure CreateMutex(const Name: String);</prototype>
- <description><p>Creates a mutex with the specified name.</p></description>
- </function>
- <function>
- <name>CheckForMutexes</name>
- <prototype>function CheckForMutexes(Mutexes: String): Boolean;</prototype>
- <description><p>Returns True if any of the mutexes in the comma-separated Mutexes string exist.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>MakePendingFileRenameOperationsChecksum</name>
- <prototype>procedure MakePendingFileRenameOperationsChecksum: String;</prototype>
- <description><p>Calculates a checksum of the current PendingFileRenameOperations registry value. The caller can use this checksum to determine if PendingFileRenameOperations or WININIT.INI was changed (perhaps by another program).</p></description>
- <example><pre>var
- ChecksumBefore, ChecksumAfter: String;
- begin
- ChecksumBefore := MakePendingFileRenameOperationsChecksum;
- // ...run a program...
- ChecksumAfter := MakePendingFileRenameOperationsChecksum;
- if ChecksumAfter <> ChecksumBefore then
- // PendingFileRenameOperations or WININIT.INI changed
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CreateCallback</name>
- <prototype>function CreateCallback(Method: AnyMethod): Longword;</prototype>
- <description><p>Allows you to perform direct callbacks from DLL functions (like Windows API functions) to functions in your script.</p></description>
- <example><pre>function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: Longword): Longword;
- external '[email protected] stdcall';
- var
- TimerCount: Integer;
- procedure MyTimerProc(Arg1, Arg2, Arg3, Arg4: Longword);
- begin
- Inc(TimerCount);
- WizardForm.BeveledLabel.Caption := ' Timer! ' + IntToStr(TimerCount);
- WizardForm.BeveledLabel.Visible := True;
- end;
- procedure InitializeWizard;
- begin
- SetTimer(0, 0, 1000, CreateCallback(@MyTimerProc));
- end;</pre></example>
- </function>
- <function>
- <name>UnloadDLL</name>
- <prototype>procedure UnloadDLL(Filename: String);</prototype>
- <description><p>Unloads the specified DLL that was loaded by the [Code] section using an "external" keyword. This can be useful if you need to delete the DLL.</p>
- <p>The case of the filename and any path name must exactly match that of the function import. You will need to expand any constants in the filename yourself before passing it to UnloadDLL.</p>
- <p>If the function import used a "files:" prefix, prepend the value of the <tt>{tmp}</tt> constant to the filename (e.g. <tt>ExpandConstant('{tmp}\filename.dll')</tt>).</p></description>
- <remarks><p>It's not recommended that you try this, but if you attempt to call a function in a DLL that has been unloaded, the DLL will be re-loaded.</p></remarks>
- <example><pre>procedure DllFunc; external 'DllFunc@{app}\MyDll.dll stdcall uninstallonly';
- ...
- begin
- // Call DllFunc
- DllFunc;
- // Unload the DLL
- UnloadDLL(ExpandConstant('{app}\MyDll.dll'));
- // Now we can delete the DLL
- DeleteFile(ExpandConstant('{app}\MyDll.dll'));
- end;</pre></example>
- </function>
- <function>
- <name>DLLGetLastError</name>
- <prototype>function DLLGetLastError(): LongInt;</prototype>
- <description><p>Returns value the last error code had right after the most recent DLL function call you made. Useful after calling Windows API functions (if the function sets the last error code).</p></description>
- <remarks><p>It's recommended to use this function instead of directly calling the GetLastError Windows API function since Setup or Uninstall makes API calls of its own, so the last error code could be overwritten at any time.</p>
- <p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381.aspx">system error codes on MSDN</a>.</p></remarks>
- <example><pre>function MessageBox(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal): Integer; external '[email protected] stdcall';
- ...
- begin
- if MessageBox(-1, '', '', -1) = 0 then
- MsgBox(SysErrorMessage(DLLGetLastError), mbError, mb_Ok);</pre></example>
- </function>
- </subcategory>
- </category>
- <category>
- <description>String</description>
- <subcategory>
- <function>
- <name>Chr</name>
- <prototype>function Chr(B: Byte): Char;</prototype>
- <description><p>Returns the character with the specified ordinal value.</p></description>
- </function>
- <function>
- <name>Ord</name>
- <prototype>function Ord(C: Char): Byte;</prototype>
- <description><p>Returns the ordinal value of the specified character.</p></description>
- </function>
- <function>
- <name>Copy</name>
- <prototype>function Copy(S: AnyString; Index, Count: Integer): String;</prototype>
- <description><p>Returns a string containing Count characters starting at S[Index].<br />If Index is larger than the length of S, Copy returns an empty string.<br />If Count specifies more characters than are available, only the characters from S[Index] to the end of S are returned.</p></description>
- </function>
- <function>
- <name>Length</name>
- <prototype>function Length(S: AnyString): LongInt;</prototype>
- <description><p>Returns the length of the specified string.</p></description>
- </function>
- <function>
- <name>Lowercase</name>
- <prototype>function Lowercase(S: AnyString): String;</prototype>
- <description><p>Returns a copy of the string S, but with all 7-bit ASCII characters between 'A' and 'Z' converted to lowercase. To convert 8-bit international characters, use AnsiLowercase instead.</p></description>
- </function>
- <function>
- <name>Uppercase</name>
- <prototype>function Uppercase(S: AnyString): String;</prototype>
- <description><p>Returns a copy of the string S, but with all 7-bit ASCII characters between 'a' and 'z' converted to uppercase. To convert 8-bit international characters, use AnsiUppercase instead.</p></description>
- </function>
- <function>
- <name>AnsiLowercase</name>
- <prototype>function AnsiLowercase(S: AnyString): String;</prototype>
- <description><p>Returns a string that is a copy of the given string converted to lowercase. The conversion uses the current Windows locale. This function supports multi-byte character sets (MBCS).</p></description>
- </function>
- <function>
- <name>AnsiUppercase</name>
- <prototype>function AnsiUppercase(S: AnyString): String;</prototype>
- <description><p>Returns a string that is a copy of the given string converted to uppercase. The conversion uses the current Windows locale. This function supports multi-byte character sets (MBCS).</p></description>
- </function>
- <function>
- <name>StringOfChar</name>
- <prototype>function StringOfChar(C: Char; I : LongInt): String;</prototype>
- <description><p>Returns a string of length I with all characters set to character C.</p></description>
- </function>
- <function>
- <name>Delete</name>
- <prototype>procedure Delete(var S: AnyString; Index, Count: Integer);</prototype>
- <description><p>Removes a substring of Count characters from string S starting at S[Index].<br />If Index is larger than the length of S, no characters are deleted. If Count specifies more characters than remain starting at the S[Index], Delete removes the rest of the string.</p></description>
- </function>
- <function>
- <name>Insert</name>
- <prototype>procedure Insert(Source: AnyString; var Dest: AnyString; Index: Integer);</prototype>
- <description><p>Merges Source into Dest at the position Dest[Index].</p></description>
- </function>
- <function>
- <name>StringChange</name>
- <prototype>function StringChange(var S: String; const FromStr, ToStr: String): Integer;</prototype>
- <description><p>This function is deprecated. It is equivalent to calling <link topic="isxfunc_StringChangeEx">StringChangeEx</link> with the SupportMBCS parameter set to False.</p></description>
- </function>
- <function>
- <name>StringChangeEx</name>
- <prototype>function StringChangeEx(var S: String; const FromStr, ToStr: String; const SupportDBCS: Boolean): Integer;</prototype>
- <description><p>Changes all occurrences in S of FromStr to ToStr. If SupportDBCS is True (recommended unless you require binary safety), double-byte character sequences in S are recognized and handled properly. Otherwise, the function behaves in a binary-safe manner. Returns the number of times FromStr was matched and changed.</p></description>
- <remarks><p>When working with strings containing paths or filenames, be sure to pass True in the SupportDBCS parameter. Otherwise, paths with Chinese, Japanese, or Korean characters may be corrupted.</p></remarks>
- <example><pre>var
- S: String;
- begin
- S := ExpandConstant('{commonappdata}');
- // S = 'C:\Documents and Settings\All Users\Application Data'
- StringChangeEx(S, '\', '/', True);
- // S = 'C:/Documents and Settings/All Users/Application Data'
- end;</pre></example>
- </function>
- <function>
- <name>Pos</name>
- <prototype>function Pos(SubStr, S: AnyString): Integer;</prototype>
- <description><p>Searches for Substr within S and returns an integer value that is the index of the first character of Substr within S.<br />If Substr is not found, Pos returns zero. The Pos function is case-sensitive.</p></description>
- </function>
- <function>
- <name>AddQuotes</name>
- <prototype>function AddQuotes(const S: String): String;</prototype>
- <description><p>Adds a quote (") character to the left and right sides of the string if the string contains a space and it didn't have quotes already. This is primarily used when spawning another process with a long filename as one of the parameters.</p></description>
- </function>
- <function>
- <name>RemoveQuotes</name>
- <prototype>function RemoveQuotes(const S: String): String;</prototype>
- <description><p>Opposite of AddQuotes; removes any quotes around the string.</p></description>
- </function>
- <function>
- <name>ConvertPercentStr</name>
- <prototype>function ConvertPercentStr(var S: String): Boolean;</prototype>
- <description><p>Expands all %-encoded characters in the string (see <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>). Returns True if all were successfully expanded.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CompareText</name>
- <prototype>function CompareText(const S1, S2: String): Integer;</prototype>
- <description><p>Compares the strings S1 and S2 and returns 0 if they are equal. If S1 is greater than S2, CompareText returns an integer greater than 0. If S1 is less than S2, CompareText returns an integer less than 0. The CompareText function is not case-sensitive.</p></description>
- </function>
- <function>
- <name>CompareStr</name>
- <prototype>function CompareStr(const S1, S2: String): Integer;</prototype>
- <description><p>Compares S1 to S2, with case-sensitivity. The return value is less than 0 if S1 is less than S2, 0 if S1 equals S2, or greater than 0 if S1 is greater than S2.</p></description>
- </function>
- <function>
- <name>SameText</name>
- <prototype>function SameText(const S1, S2: String): Boolean;</prototype>
- <description><p>Compares the strings S1 and S2 and returns True if they are equal. The SameText function is not case-sensitive.</p></description>
- </function>
- <function>
- <name>SameStr</name>
- <prototype>function SameStr(const S1, S2: String): Boolean;</prototype>
- <description><p>Compares S1 to S2, with case-sensitivity. The return value is True if they are equal.</p></description>
- </function>
- <function>
- <name>IsWildcard</name>
- <prototype>function IsWildcard(const Pattern: String): Boolean;</prototype>
- <description><p>Returns True if the specified pattern contains a wildcard.</p></description>
- </function>
- <function>
- <name>WildcardMatch</name>
- <prototype>function WildcardMatch(const Text, Pattern: String): Boolean;</prototype>
- <description><p>Returns True if the specified text matches the specified pattern.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>Format</name>
- <prototype>function Format(const Format: String; const Args: array of const): String;</prototype>
- <description><p>Formats the series of arguments in the open array Args. Formatting is controlled by the format string Format; the results are returned as a string.</p>
- <p>An exception will be raised if an invalid format string is specified, too few arguments are passed, or if any arguments are of the wrong type.</p></description>
- <example><pre>var
- S: String;
- I: Integer;
- begin
- S := Format('%d files found', [10]);
- // S = '10 files found'
- S := Format('Filename: %s', ['file.txt']);
- // S = 'Filename: file.txt'
- I := 64;
- S := Format('%d in hex, padded to 8 digits: %.8x', [I, I]);
- // S = '64 in hex, padded to 8 digits: 00000040'
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>Trim</name>
- <prototype>function Trim(const S: AnyString): AnyString;</prototype>
- <description><p>Trims leading and trailing spaces and control characters from the given string S.</p></description>
- </function>
- <function>
- <name>TrimLeft</name>
- <prototype>function TrimLeft(const S: String): String;</prototype>
- <description><p>Trims leading spaces and control characters from the given string S.</p></description>
- </function>
- <function>
- <name>TrimRight</name>
- <prototype>function TrimRight(const S: String): String;</prototype>
- <description><p>Trims trailing spaces and control characters from the given string S.</p></description>
- </function>
- <function>
- <name>StringJoin</name>
- <prototype>function StringJoin(const Separator: String; const Values: TArrayOfString): String;</prototype>
- <description><p>Joins two or more strings together separated by the given separator.</p></description>
- <example><pre>var
- S: String;
- begin
- S := StringJoin(',', ['1', '2']);
- // S = '1,2'
- end;
- </pre></example>
- <seealso><p><link topic="isxfunc_StringSplit">StringSplit</link></p></seealso>
- </function>
- <function>
- <name>StringSplit</name>
- <prototype>function StringSplit(const S: String; const Separators: TArrayOfString; const Typ: TSplitType): TArrayOfString;</prototype>
- <description><p>Splits the given string into substrings, using the given characters or strings to be used as separator. Empty substrings can be ignored.</p>
- <p>TSplitType is defined as:</p>
- <p><tt>TSplitType = (stAll, stExcludeEmpty, stExcludeLastEmpty);</tt></p></description>
- <example><pre>var
- A: array of String;
- begin
- A := StringSplit('1,,2', [','], stExcludeEmpty);
- // A = ['1','2']
- end;
- </pre></example>
- <seealso><p><link topic="isxfunc_StringJoin">StringJoin</link><br />
- <link topic="isxfunc_StringSplitEx">StringSplitEx</link></p></seealso>
- </function>
- <function>
- <name>StringSplitEx</name>
- <prototype>function StringSplitEx(const S: String; const Separators: TArrayOfString; const Quote: Char; const Typ: TSplitType): TArrayOfString;</prototype>
- <description><p>Splits the given string into substrings, using the given characters or strings to be used as separator. Empty substrings can be ignored. Use the Quote parameter to specify the start and end character of a quoted part of the string where separators are ignored.</p>
- <p>TSplitType is defined as:</p>
- <p><tt>TSplitType = (stAll, stExcludeEmpty, stExcludeLastEmpty);</tt></p></description>
- <example><pre>var
- A: array of String;
- begin
- A := StringSplitEx('1,",",2', [','], '"', stAll);
- // A = ['1','","','2']
- end;
- </pre></example>
- <seealso><p><link topic="isxfunc_StringSplit">StringSplit</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>StrToIntDef</name>
- <prototype>function StrToIntDef(S: String; Def: LongInt): LongInt;</prototype>
- <description><p>The StrToInt function converts the string passed in S into a number. If S does not represent a valid number, StrToInt returns the number passed in Def.</p></description>
- </function>
- <function>
- <name>StrToInt</name>
- <prototype>function StrToInt(S: String): LongInt;</prototype>
- <description><p>The StrToInt function converts the string passed in S into a number.</p></description>
- <remarks><p>Use of <link topic="isxfunc_StrToIntDef">StrToIntDef</link> instead of StrToInt is recommended.</p></remarks>
- </function>
- <function>
- <name>StrToInt64Def</name>
- <prototype>function StrToInt64Def(S: String; Def: Int64): Int64;</prototype>
- <description><p>The StrToInt64Def function converts the string passed in S into a 64-bit number. If S does not represent a valid 64-bit number, StrToInt returns the 64-bit number passed in Def.</p></description>
- </function>
- <function>
- <name>StrToInt64</name>
- <prototype>function StrToInt64(S: String): Int64;</prototype>
- <description><p>The StrToInt64 function converts the string passed in S into a 64-bit number.</p></description>
- <remarks><p>Use of <link topic="isxfunc_StrToInt64Def">StrToInt64Def</link> instead of StrToInt64 is recommended.</p></remarks>
- </function>
- <function>
- <name>StrToFloat</name>
- <prototype>function StrToFloat(S: String): Extended;</prototype>
- <description><p>The StrToFloat function converts the string passed in S into a floating point number. The character used for the decimal point should always be a dot.</p></description>
- </function>
- <function>
- <name>IntToStr</name>
- <prototype>function IntToStr(I: Int64): String;</prototype>
- <description><p>The IntToStr function converts a 64-bit number into a string.</p></description>
- </function>
- <function>
- <name>FloatToStr</name>
- <prototype>function FloatToStr(E: Extended): String;</prototype>
- <description><p>The FloatToStr function converts a floating point number into a string.</p><p>The character used for the decimal point will always be a dot.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CharLength</name>
- <prototype>function CharLength(const S: String; const Index: Integer): Integer;</prototype>
- <description><p>Returns the length in bytes (1 or 2) of the character in the specified string at the specified index.</p></description>
- <remarks><p>In double-byte character sets (Chinese, Japanese, Korean), most non-ASCII characters occupy two bytes. Note that the second byte of a double-byte character -- known as the "trail byte" -- can be in the same range used by ASCII characters (below 128). Thus, when stepping through a string that may contain double-byte characters, such as a path or filename, care must be taken to not mistake trail bytes for single-byte ASCII characters.</p></remarks>
- <example><pre>function BackslashToSlash(const S: String): String;
- var
- I: Integer;
- begin
- Result := S;
- I := 1;
- while I <= Length(Result) do
- begin
- if Result[I] = '\' then
- Result[I] := '/';
- // Go to the next character. But do not simply increment I by 1.
- // Increment by CharLength() in case Result[I] is a double-byte character.
- I := I + CharLength(Result, I);
- end;
- end;
- ...
- begin
- // Show path of Common Files with backslashes changed to forward slashes
- MsgBox(BackslashToSlash(ExpandConstant('{cf}')), mbInformation, MB_OK);
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>AddBackslash</name>
- <prototype>function AddBackslash(const S: String): String;</prototype>
- <description><p>Returns the specified string with a trailing backslash added, unless the string is empty or already ends in a slash or backslash.</p></description>
- </function>
- <function>
- <name>RemoveBackslashUnlessRoot</name>
- <prototype>function RemoveBackslashUnlessRoot(const S: String): String;</prototype>
- <description><p>Returns the specified string with any trailing slashes/backslashes removed, unless the string specifies the root directory of a drive (e.g. "C:\" or "\"), in which case it leaves 1 slash.</p></description>
- </function>
- <function>
- <name>RemoveBackslash</name>
- <prototype>function RemoveBackslash(const S: String): String;</prototype>
- <description><p>Returns the specified string with any trailing slashes/backslashes removed.</p></description>
- <remarks><p>Use of this function is discouraged; use <link topic="isxfunc_RemoveBackslashUnlessRoot">RemoveBackslashUnlessRoot</link> instead when working with file system paths.</p></remarks>
- </function>
- <function>
- <name>AddPeriod</name>
- <prototype>function AddPeriod(const S: String): String;</prototype>
- <description><p>Returns the specified string with a trailing period added, unless the string is empty or already ends in a period or other punctuation mark.</p></description>
- </function>
- <function>
- <name>ChangeFileExt</name>
- <prototype>function ChangeFileExt(const FileName, Extension: String): String;</prototype>
- <description><p>Takes the file name passed in FileName and changes the extension of the file name to the extension passed in Extension.</p></description>
- </function>
- <function>
- <name>ExtractFileExt</name>
- <prototype>function ExtractFileExt(const FileName: String): String;</prototype>
- <description><p>Extracts the extension part of the given file name. The resulting string includes the period character that separates the name and extension parts. The resulting string is empty if the given filename has no extension.</p></description>
- </function>
- <function>
- <name>ExtractFileDir</name>
- <prototype>function ExtractFileDir(const FileName: String): String;</prototype>
- <description><p>Extracts the drive and directory parts of the given file name, excluding a trailing backslash (unless it is a root directory). The resulting string is empty if FileName contains no drive and directory parts.</p></description>
- <seealso><p><link topic="isxfunc_ExtractFilePath">ExtractFilePath</link></p></seealso>
- </function>
- <function>
- <name>ExtractFilePath</name>
- <prototype>function ExtractFilePath(const FileName: String): String;</prototype>
- <description><p>Extracts the drive and directory parts of the given file name, including a trailing backslash. The resulting string is the leftmost characters of FileName, up to and including the colon or backslash that separates the path information from the name and extension. The resulting string is empty if FileName contains no drive and directory parts.</p></description>
- <seealso><p><link topic="isxfunc_ExtractFileDir">ExtractFileDir</link></p></seealso>
- </function>
- <function>
- <name>ExtractFileName</name>
- <prototype>function ExtractFileName(const FileName: String): String;</prototype>
- <description><p>Extracts the name and extension parts of the given file name. The resulting string is the rightmost characters of FileName, starting with the first character after the colon or backslash that separates the path information from the name and extension. The resulting string is equal to FileName if FileName contains no drive and directory parts.</p></description>
- </function>
- <function>
- <name>ExtractFileDrive</name>
- <prototype>function ExtractFileDrive(const FileName: String): String;</prototype>
- <description><p>Returns a string containing the 'drive' portion of a fully qualified path name for the file passed in the FileName. For file names with drive letters, the resulting string is in the form '<drive>:'. For file names with a UNC path the resulting string is in the form '\\<servername>\<sharename>'. If the given path contains neither style of path prefix, the result is an empty string.</p></description>
- </function>
- <function>
- <name>ExtractRelativePath</name>
- <prototype>function ExtractRelativePath(const BaseName, DestName: String): String;</prototype>
- <description><p>Converts a fully qualified path name into a relative path name. The DestName parameter specifies the file name (including path) to be converted. BaseName is the fully qualified name of the base directory to which the returned path name should be relative. BaseName may or may not include a file name, but it must include the final path delimiter.</p>
- <p>ExtractRelativePath strips out common path directories and inserts '..\' for each level up from the BaseName.</p></description>
- <example><pre>var
- S: String;
- begin
- S := ExtractRelativePath('c:\windows\system32\', 'c:\autoexec.bat');
- // S = ..\..\autoexec.bat
- end;</pre></example>
- </function>
- <function>
- <name>ExpandFileName</name>
- <prototype>function ExpandFileName(const FileName: String): String;</prototype>
- <description><p>Returns a string containing a fully qualified path name for the file passed in the FileName. A fully qualified path name includes the drive letter and any directory and subdirectories in addition to the file name and extension.</p></description>
- </function>
- <function>
- <name>ExpandUNCFileName</name>
- <prototype>function ExpandUNCFileName(const FileName: String): String;</prototype>
- <description><p>Returns a string containing a fully qualified path name for the file passed in the FileName. A fully qualified path name includes the drive portion of the filename in the UNC format '\\<servername>\<sharename>' if the drive letter is mapped to a network resource instead of a local drive and any directory and subdirectories in addition to the file name and extension.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetDateTimeString</name>
- <prototype>function GetDateTimeString(const DateTimeFormat: String; const DateSeparator, TimeSeparator: Char): String;</prototype>
- <description><p>Returns the current date and time as a string using the specified formatting. The following format specifiers are supported:<br />
- <br />
- d Displays the day as a number without a leading zero (1-31).<br />
- dd Displays the day as a number with a leading zero (01-31).<br />
- ddd Displays the day as an abbreviation (Sun-Sat).<br />
- dddd Displays the day as a full name (Sunday-Saturday).<br />
- ddddd Displays the date using the system's short date format.<br />
- dddddd Displays the date using the system's long date format.<br />
- m Displays the month as a number without a leading zero (1-12).<br />
- If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.<br />
- mm Displays the month as a number with a leading zero (01-12).<br />
- If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.<br />
- mmm Displays the month as an abbreviation (Jan-Dec).<br />
- mmmm Displays the month as a full name (January-December).<br />
- yy Displays the year as a two-digit number (00-99).<br />
- yyyy Displays the year as a four-digit number (0000-9999).<br />
- h Displays the hour without a leading zero (0-23).<br />
- hh Displays the hour with a leading zero (00-23).<br />
- n Displays the minute without a leading zero (0-59).<br />
- nn Displays the minute with a leading zero (00-59).<br />
- s Displays the second without a leading zero (0-59).<br />
- ss Displays the second with a leading zero (00-59).<br />
- t Displays the time using the system's short time format.<br />
- tt Displays the time using the system's long time format.<br />
- am/pm Uses the 12-hour clock for the preceding h or hh specifier.<br />
- Displays 'am' for any hour before noon, and 'pm' for any hour after noon.<br />
- The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.<br />
- a/p Uses the 12-hour clock for the preceding h or hh specifier.<br />
- Displays 'a' for any hour before noon, and 'p' for any hour after noon.<br />
- The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.<br />
- / Displays the date separator character given by the DateSeparator parameter.<br />
- If DateSeparator is set to #0, the system's date separator character will be used instead.<br />
- : Displays the time separator character given by the TimeSeparator parameter.<br />
- If TimeSeparator is set to #0, the system's time separator character will be used instead.<br />
- 'xx'/"xx" Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.<br />
- <br />
- Format specifiers may be written in upper case as well as in lower case letters--both produce the same result.</p></description>
- <example><pre>
- GetDateTimeString('ddddd', #0, #0);
- GetDateTimeString('ddddd tt', #0, #0);
- GetDateTimeString('dd/mm/yyyy hh:nn:ss', '-', ':');
- </pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>SetLength</name>
- <prototype>procedure SetLength(var S: AnyString; L: LongInt);</prototype>
- <description><p>Sets the length of a string.</p></description>
- </function>
- <function>
- <name>CharToOemBuff</name>
- <prototype>procedure CharToOemBuff(var S: AnsiString);</prototype>
- <description><p>Translates an ANSI string to a string with characters from the OEM-defined character set.</p></description>
- </function>
- <function>
- <name>OemToCharBuff</name>
- <prototype>procedure OemToCharBuff(var S: AnsiString);</prototype>
- <description><p>Translates a string with characters from the OEM-defined character set into an ANSI string.</p></description>
- </function>
- <function>
- <name>Utf8Encode</name>
- <prototype>function Utf8Encode(const S: String): AnsiString;</prototype>
- <description><p>Encodes a Unicode string into a UTF-8 encoded ANSI string.</p></description>
- </function>
- <function>
- <name>Utf8Decode</name>
- <prototype>function Utf8Decode(const S: AnsiString): String;</prototype>
- <description><p>Decodes a UTF-8 encoded ANSI string into a Unicode string.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetMD5OfString</name>
- <prototype>function GetMD5OfString(const S: AnsiString): String;</prototype>
- <description><p>Gets the MD5 sum of the specified string, as a string.</p></description>
- <example><pre>var
- MD5: String;
- begin
- MD5 := GetMD5OfString('Test');
- // MD5 = '0cbc6611f5540bd0809a388dc95a615b'
- end;
- </pre></example>
- </function>
- <function>
- <name>GetMD5OfUnicodeString</name>
- <prototype>function GetMD5OfUnicodeString(const S: String): String;</prototype>
- <description><p>Gets the MD5 sum of the specified string, as a string.</p></description>
- <example><pre>var
- MD5: String;
- begin
- MD5 := GetMD5OfUnicodeString('Test');
- // MD5 = '8e06915d5f5d4f8754f51892d884c477'
- end;
- </pre></example>
- </function>
- <function>
- <name>GetSHA1OfString</name>
- <prototype>function GetSHA1OfString(const S: AnsiString): String;</prototype>
- <description><p>Gets the SHA-1 hash of the specified string, as a string.</p></description>
- <example><pre>var
- SHA1: String;
- begin
- SHA1 := GetSHA1OfString('Test');
- // SHA1 = '640ab2bae07bedc4c163f679a746f7ab7fb5d1fa'
- end;
- </pre></example>
- </function>
- <function>
- <name>GetSHA1OfUnicodeString</name>
- <prototype>function GetSHA1OfUnicodeString(const S: String): String;</prototype>
- <description><p>Gets the SHA-1 hash of the specified string, as a string.</p></description>
- <example><pre>var
- SHA1: String;
- begin
- SHA1 := GetSHA1OfUnicodeString('Test');
- // SHA1 = '9ab696a37604d665dc97134dbee44cfe70451b1a'
- end;
- </pre></example>
- </function>
- <function>
- <name>GetSHA256OfString</name>
- <prototype>function GetSHA256OfString(const S: AnsiString): String;</prototype>
- <description><p>Gets the SHA-256 hash of the specified string, as a string.</p></description>
- <example><pre>var
- SHA256: String;
- begin
- SHA256 := GetSHA256OfString('Test');
- // SHA256 = '532eaabd9574880dbf76b9b8cc00832c20a6ec113d682299550d7a6e0f345e25'
- end;
- </pre></example>
- </function>
- <function>
- <name>GetSHA256OfUnicodeString</name>
- <prototype>function GetSHA256OfUnicodeString(const S: String): String;</prototype>
- <description><p>Gets the SHA-256 hash of the specified string, as a string.</p></description>
- <example><pre>var
- SHA256: String;
- begin
- SHA256 := GetSHA256OfUnicodeString('Test');
- // SHA256 = 'e6fa3ca87b1b641ab646d3b4933bba8d0970763f030b6578a60abdeae7366247'
- end;
- </pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>SysErrorMessage</name>
- <prototype>function SysErrorMessage(ErrorCode: Integer): String;</prototype>
- <description><p>Returns a localized error message string that corresponds to the given operating system error code.</p></description>
- <remarks><p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381.aspx">system error codes on MSDN</a>.</p></remarks>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>MinimizePathName</name>
- <prototype>function MinimizePathName(const Filename: String; const Font: TFont; MaxLen: Integer): String;</prototype>
- <description><p>Returns a minimized filename that will not take more than MaxLen pixels to display with the given font. The minimizing is done by replacing the middle part with '...' as needed.</p></description>
- <example><pre>MyLabel.Caption := MinimizePathName(MyPathName, MyLabel.Font, MyLabel.Width);</pre></example>
- <seealso><p><link topic="scriptclasses" anchor="TFont">TFont</link></p></seealso>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Array</description>
- <subcategory>
- <function>
- <name>GetArrayLength</name>
- <prototype>function GetArrayLength(var Arr: Array): LongInt;</prototype>
- <description><p>Gets the length of an array.</p></description>
- </function>
- <function>
- <name>SetArrayLength</name>
- <prototype>procedure SetArrayLength(var Arr: Array; I: LongInt);</prototype>
- <description><p>Sets the length of an array. Always call SetArrayLength before accessing the elements in an array.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Stream</description>
- <subcategory>
- <function>
- <name>GetSHA256OfStream</name>
- <prototype>function GetSHA256OfStream(const Stream: TStream): String;</prototype>
- <description><p>Gets the SHA-256 hash of the specified stream, as a string. An exception will be raised upon failure.</p></description>
- <seealso><p><link topic="isxfunc_GetSHA256OfFile">GetSHA256OfFile</link></p></seealso>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Variant</description>
- <subcategory>
- <function>
- <name>Null</name>
- <prototype>function Null: Variant;</prototype>
- <description><p>Returns a variant with a value of Null.</p></description>
- </function>
- <function>
- <name>Unassigned</name>
- <prototype>function Unassigned: Variant;</prototype>
- <description><p>Returns a variant with no value assigned.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>VarIsEmpty</name>
- <prototype>function VarIsEmpty(const V: Variant): Boolean;</prototype>
- <description><p>Returns True if the specified variant is unassigned.</p></description>
- <seealso><p><link topic="isxfunc_VarIsClear">VarIsClear</link></p></seealso>
- </function>
- <function>
- <name>VarIsClear</name>
- <prototype>function VarIsClear(const V: Variant): Boolean;</prototype>
- <description><p>Returns True if the specified variant's value is undefined.</p></description>
- <seealso><p><link topic="isxfunc_VarIsEmpty">VarIsEmpty</link></p></seealso>
- </function>
- <function>
- <name>VarIsNull</name>
- <prototype>function VarIsNull(const V: Variant): Boolean;</prototype>
- <description><p>Returns True if the specified variant has a value of Null assigned.</p></description>
- </function>
- <function>
- <name>VarType</name>
- <prototype>function VarType(const V: Variant): TVarType;</prototype>
- <description><p>Returns the type code of the specified variant.</p>
- <p>The lower twelve bits of a variant type code (the bits defined by the varTypeMask bit mask) define the type of the variant. The varArray bit is set if the variant is an array of the given type. The varByRef bit is set if the variant is a reference to a value of the given type as opposed to an actual value.</p>
- <p>The following variant type code constants are defined:</p>
- <pre>
- const
- varEmpty = $0000;
- varNull = $0001;
- varSmallInt = $0002;
- varInteger = $0003;
- varSingle = $0004;
- varDouble = $0005;
- varCurrency = $0006;
- varDate = $0007;
- varOleStr = $0008;
- varDispatch = $0009;
- varError = $000A;
- varBoolean = $000B;
- varVariant = $000C;
- varUnknown = $000D;
- varByte = $0011;
- varWord = $0012;
- varLongWord = $0013;
- varInt64 = $0014;
- varStrArg = $0048;
- varString = $0100;
- varAny = $0101;
- varUString = $0102;
- varTypeMask = $0FFF;
- varArray = $2000;
- varByRef = $4000;
- </pre>
- </description>
- </function>
- <function>
- <name>VarArrayGet</name>
- <prototype>function VarArrayGet(var S: Variant; I: Integer): Variant;</prototype>
- <description><p>Returns the specified element of the specified variant array.</p></description>
- </function>
- <function>
- <name>VarArraySet</name>
- <prototype>procedure VarArraySet(C: Variant; I: Integer; var S: Variant);</prototype>
- <description><p>Sets the specified element of the specified variant array.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>File System</description>
- <subcategory>
- <function>
- <name>DirExists</name>
- <prototype>function DirExists(const Name: String): Boolean;</prototype>
- <description><p>Returns True if the specified directory name exists. The specified name may include a trailing backslash.</p></description>
- </function>
- <function>
- <name>FileExists</name>
- <prototype>function FileExists(const Name: String): Boolean;</prototype>
- <description><p>Returns True if the specified file exists.</p></description>
- </function>
- <function>
- <name>FileOrDirExists</name>
- <prototype>function FileOrDirExists(const Name: String): Boolean;</prototype>
- <description><p>Returns True if the specified directory or file name exists. The specified name may include a trailing backslash.</p></description>
- </function>
- <function>
- <name>FileSize</name>
- <prototype>function FileSize(const Name: String; var Size: Integer): Boolean;</prototype>
- <description><p>Sets Size to the size of the specified file in bytes. Returns True if the file size was set successfully and False otherwise. Only supports file sizes smaller than 2 GB. To get all 64 bits of the file size, use <link topic="isxfunc_FileSize64">FileSize64</link> instead.</p></description>
- </function>
- <function>
- <name>FileSize64</name>
- <prototype>function FileSize64(const Name: String; var Size: Int64): Boolean;</prototype>
- <description><p>Sets Size to the size of the specified file in bytes. Returns True if the file size was set successfully and False otherwise.</p></description>
- </function>
- <function>
- <name>GetSpaceOnDisk</name>
- <prototype>function GetSpaceOnDisk(const Path: String; const InMegabytes: Boolean; var Free, Total: Cardinal): Boolean;</prototype>
- <description><p>Returns the number of free and total bytes or megabytes on a drive. Path specifies a directory on the drive or UNC share to check; it can be either the root (e.g. <tt>C:\</tt>) or an existing subdirectory. The setting of the InMegabytes parameter determines whether it returns figures in bytes or in megabytes (2^20), rounded down. Returns True if successful, False otherwise.</p></description>
- <remarks><p>The figures returned by this function are capped at 2147483647 (2^31-1). Therefore, if InMegaBytes is False, it will return no more than 2147483647 bytes. If InMegaBytes is True, it will return no more than 2147483647 megabytes.</p></remarks>
- <example><pre>var
- Path: String;
- FreeMB, TotalMB: Cardinal;
- begin
- // Get and display free megabytes on the Program Files drive
- Path := ExpandConstant('{autopf}');
- if GetSpaceOnDisk(Path, True, FreeMB, TotalMB) then
- begin
- MsgBox('There are ' + IntToStr(FreeMB) + ' megabytes free on ' +
- Path, mbInformation, MB_OK);
- end
- else begin
- // the function failed
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_GetSpaceOnDisk64">GetSpaceOnDisk64</link></p></seealso>
- </function>
- <function>
- <name>GetSpaceOnDisk64</name>
- <prototype>function GetSpaceOnDisk64(const Path: String; var Free, Total: Int64): Boolean;</prototype>
- <description><p>Returns the number of free and total bytes on a drive. Path specifies a directory on the drive or UNC share to check; it can be either the root (e.g. <tt>C:\</tt>) or an existing subdirectory. Returns True if successful, False otherwise.</p></description>
- <example><pre>var
- Path: String;
- FreeBytes, TotalBytes: Int64;
- begin
- // Get and display free bytes on the Program Files drive
- Path := ExpandConstant('{autopf}');
- if GetSpaceOnDisk64(Path, FreeBytes, TotalBytes) then
- begin
- MsgBox('There are ' + IntToStr(FreeBytes) + ' bytes free on ' +
- Path, mbInformation, MB_OK);
- end
- else begin
- // the function failed
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_GetSpaceOnDisk">GetSpaceOnDisk</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>FileSearch</name>
- <prototype>function FileSearch(const Name, DirList: String): String;</prototype>
- <description><p>Searches through the directories passed in DirList for a file named Name. DirList should be directory names separated by semicolons. If FileSearch locates a file matching Name, it returns a string containing a fully-qualified path name for that file. If no matching file exists, FileSearch returns an empty string.</p></description>
- </function>
- <function>
- <name>FindFirst</name>
- <prototype>function FindFirst(const FileName: String; var FindRec: TFindRec): Boolean;</prototype>
- <description><p>Retrieves information about the first file matching the wildcard specified by FileName. Returns True if successful.</p>
- <p>TFindRec is defined as:</p>
- <pre>
- TFindRec = record
- Name: String; // name of the found file (no path)
- Attributes: LongWord; // file attributes
- SizeHigh: LongWord; // size of the file, upper 32 bits
- SizeLow: LongWord; // size of the file, lower 32 bits
- CreationTime: TFileTime; // time file was created
- LastAccessTime: TFileTime; // time file was last accessed
- LastWriteTime: TFileTime; // time file was last modified
- AlternateName: String; // file's short name (empty if none)
- FindHandle: THandle; // used internally
- end;
- </pre>
- <p>TFileTime is defined as:</p>
- <pre>
- TFileTime = record
- dwLowDateTime: DWORD;
- dwHighDateTime: DWORD;
- end;
- </pre>
- <p>Valid file attributes are:</p>
- <pre>
- FILE_ATTRIBUTE_READONLY
- FILE_ATTRIBUTE_HIDDEN
- FILE_ATTRIBUTE_SYSTEM
- FILE_ATTRIBUTE_DIRECTORY
- FILE_ATTRIBUTE_ARCHIVE
- FILE_ATTRIBUTE_DEVICE
- FILE_ATTRIBUTE_NORMAL
- FILE_ATTRIBUTE_TEMPORARY
- FILE_ATTRIBUTE_SPARSE_FILE
- FILE_ATTRIBUTE_REPARSE_POINT
- FILE_ATTRIBUTE_COMPRESSED
- FILE_ATTRIBUTE_OFFLINE
- FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
- FILE_ATTRIBUTE_ENCRYPTED
- </pre></description>
- <remarks><p>If FindFirst returns True, call <link topic="isxfunc_FindNext">FindNext</link> to enumerate the rest of the files, and then <link topic="isxfunc_FindClose">FindClose</link>.</p></remarks>
- <example><p>The following example counts the number of files in the Windows System directory.</p>
- <pre>var
- FilesFound: Integer;
- FindRec: TFindRec;
- begin
- FilesFound := 0;
- if FindFirst(ExpandConstant('{sys}\*'), FindRec) then begin
- try
- repeat
- // Don't count directories
- if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
- FilesFound := FilesFound + 1;
- until not FindNext(FindRec);
- finally
- FindClose(FindRec);
- end;
- end;
- MsgBox(IntToStr(FilesFound) + ' files found in the System directory.',
- mbInformation, MB_OK);
- end;</pre></example>
- <seealso><p><link topic="isxfunc_FindNext">FindNext</link><br />
- <link topic="isxfunc_FindClose">FindClose</link></p></seealso>
- </function>
- <function>
- <name>FindNext</name>
- <prototype>function FindNext(var FindRec: TFindRec): Boolean;</prototype>
- <description><p>Retrieves information about the next matching file after a call to <link topic="isxfunc_FindFirst">FindFirst</link>. Returns True if successful.</p></description>
- <example><p>For an example, see the documentation for <link topic="isxfunc_FindFirst">FindFirst</link>.</p></example>
- <seealso><p><link topic="isxfunc_FindFirst">FindFirst</link><br />
- <link topic="isxfunc_FindClose">FindClose</link></p></seealso>
- </function>
- <function>
- <name>FindClose</name>
- <prototype>procedure FindClose(var FindRec: TFindRec);</prototype>
- <description><p>Ends a find sequence, and frees the resources associated with it. You should always call this when <link topic="isxfunc_FindFirst">FindFirst</link> returns True.</p></description>
- <example><p>For an example, see the documentation for <link topic="isxfunc_FindFirst">FindFirst</link>.</p></example>
- <seealso><p><link topic="isxfunc_FindFirst">FindFirst</link><br />
- <link topic="isxfunc_FindNext">FindNext</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetCurrentDir</name>
- <prototype>function GetCurrentDir: String;</prototype>
- <description><p>Returns a string containing the name of the current directory.</p></description>
- </function>
- <function>
- <name>SetCurrentDir</name>
- <prototype>function SetCurrentDir(const Dir: String): Boolean;</prototype>
- <description><p>Sets the current directory. The return value is True if the current directory was successfully changed, or False if an error occurred.</p></description>
- </function>
- <function>
- <name>GetWinDir</name>
- <prototype>function GetWinDir: String;</prototype>
- <description><p>Returns fully qualified path of the Windows directory. Only includes a trailing backslash if the Windows directory is the root directory.</p></description>
- </function>
- <function>
- <name>GetSystemDir</name>
- <prototype>function GetSystemDir: String;</prototype>
- <description><p>Returns fully qualified path of the Windows System directory. Only includes a trailing backslash if the Windows System directory is the root directory.</p></description>
- </function>
- <function>
- <name>GetSysWow64Dir</name>
- <prototype>function GetSysWow64Dir: String;</prototype>
- <description><p>64-bit Windows only: returns fully qualified path of the SysWOW64 directory. This is the actual directory in which 32-bit system files reside. An empty string is returned if this function is called on 32-bit Windows, or if for some reason it fails to retrieve the path on 64-bit Windows (unlikely).</p></description>
- <example><pre>var
- S: String;
- begin
- S := GetSysWow64Dir;
- // Must check the result -- an empty string is returned
- // if there is no SysWOW64 directory.
- if S <> '' then
- MsgBox('SysWOW64 directory: ' + S, mbInformation, MB_OK)
- else
- MsgBox('There is no SysWOW64 directory.', mbInformation, MB_OK);
- end;</pre></example>
- </function>
- <function>
- <name>GetTempDir</name>
- <prototype>function GetTempDir: String;</prototype>
- <description><p>Returns fully qualified path of the temporary directory, with trailing backslash. This does not use the Win32 function GetTempPath, due to platform differences.<br />Gets the temporary file path as follows:<br />1. The path specified by the TMP environment variable.<br />2. The path specified by the TEMP environment variable, if TMP is not defined or if TMP specifies a directory that does not exist.<br />3. The path specified by the USERPROFILE environment variable, if both TMP and TEMP are not defined or specify nonexistent directories.<br />4. The Windows directory, if all the above TMP, TEMP and USERPROFILE are not defined or specify nonexistent directories.</p></description>
- </function>
- <function>
- <name>GetShellFolderByCSIDL</name>
- <prototype>function GetShellFolderByCSIDL(const Folder: Integer; const Create: Boolean): String;</prototype>
- <description><p>Gets the path of the specified shell folder. Folder specifies the value of a CSIDL constant (a complete list of which can be found in ShlObj.h). If Create is True, the folder will be created if it does not exist. On failure, an empty string is returned.</p></description>
- <remarks><p>It is recommended that you always specify True in the Create parameter. Otherwise, the function may fail if the CSIDL value is valid but the directory does not currently exist. (This is a Windows issue.)</p></remarks>
- <example><pre>const
- CSIDL_MYPICTURES = $0027;
- ...
- var
- Path: String;
- begin
- Path := GetShellFolderByCSIDL(CSIDL_MYPICTURES, True);
- if Path <> '' then
- begin
- MsgBox('My Pictures path = ' + Path, mbInformation, MB_OK);
- end
- else
- begin
- // handle failure
- end;
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetShortName</name>
- <prototype>function GetShortName(const LongName: String): String;</prototype>
- <description><p>Returns the short version of the specified long filename. If the short version of the long filename is not found, the long filename is returned.</p></description>
- </function>
- <function>
- <name>GenerateUniqueName</name>
- <prototype>function GenerateUniqueName(Path: String; const Extension: String): String;</prototype>
- <description><p>Generates a unique filename for a file in the specified path with the specified extension.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>IsProtectedSystemFile</name>
- <prototype>function IsProtectedSystemFile(const Filename: String): Boolean;</prototype>
- <description><p>Returns True if the specified file is protected by Windows File Protection (and therefore can't be replaced).</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>EnableFsRedirection</name>
- <prototype>function EnableFsRedirection(const Enable: Boolean): Boolean;</prototype>
- <description><p>Controls whether built-in support functions that access files disable WOW64 file system redirection (with <link topic="64bitlimitations">some exceptions</link>). Specify True in the Enable parameter to leave redirection enabled when those functions are called; specify False to disable it. Returns the previous redirection state (True if redirection was enabled).</p>
- <p>If False is passed in the Enable parameter and the user isn't running a supported 64-bit version of Windows, an exception will be raised. To avoid the exception, call <link topic="isxfunc_IsWin64">IsWin64</link> first.</p></description>
- <remarks><p>After you've performed the operation that required changing the redirection state, be sure to restore the previous state. Always use a <tt>try..finally</tt> language construct to ensure that the previous state is restored even if an exception occurs. See below for an example.</p>
- <p>By default, file system redirection is enabled in <link topic="32vs64bitinstalls">32-bit install mode</link>, and disabled in 64-bit install mode.</p>
- <p>This function has no effect on calls to functions in external DLLs. When invoking external functions, file system redirection is always left enabled.</p>
- <p>It is legal to call this function with True in the Enable parameter if the user isn't running a 64-bit version of Windows. In such a case, the call has no effect.</p></remarks>
- <example><p>The following example demonstrates how to launch an executable located in the 64-bit System directory. (Note: In <link topic="32vs64bitinstalls">64-bit install mode</link>, it isn't necessary to call EnableFsRedirection because file system redirection is already disabled by default.)</p>
- <pre>var
- OldState: Boolean;
- ResultCode: Integer;
- begin
- // First verify that the user is running a supported 64-bit version
- // of Windows, because calling EnableFsRedirection(False) will
- // raise an exception otherwise.
- if IsWin64 then
- begin
- // Turn off redirection, so that cmd.exe from the 64-bit System
- // directory is launched.
- OldState := EnableFsRedirection(False);
- try
- Exec(ExpandConstant('{cmd}'), '', '', SW_SHOWNORMAL,
- ewWaitUntilTerminated, ResultCode);
- finally
- // Restore the previous redirection state.
- EnableFsRedirection(OldState);
- end;
- end;
- end;</pre></example>
- </function>
- </subcategory>
- </category>
- <category>
- <description>File</description>
- <subcategory>
- <function>
- <name>Exec</name>
- <prototype>function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;</prototype>
- <description><p>Executes the specified executable or batch file, using the same credentials as Setup/Uninstall. The Wait parameter specifies whether the function should return immediately or wait until the launched process has terminated or is idle. Returns True if the specified file was executed successfully, False otherwise.</p>
- <p>If True is returned and Wait is ewWaitUntilTerminated then ResultCode returns the exit code of the process.</p>
- <p>If False is returned then ResultCode specifies the error that occurred. Use SysErrorMessage(ResultCode) to get a description of the error.</p></description>
- <remarks><p>TExecWait is defined as:</p>
- <p><tt>TExecWait = (ewNoWait, ewWaitUntilTerminated, ewWaitUntilIdle);</tt></p>
- <p>Use the <link topic="isxfunc_ShellExec">ShellExec</link> function instead if you need to launch a file that is not an executable or batch file.</p>
- <p>Do not include quotes in the Filename parameter; the function will add them automatically.</p>
- <p>The WorkingDir parameter can be an empty string, in which case it will try to extract a pathname from the Filename parameter and use that as the initial current directory for the process. If no pathname was specified in Filename, a default directory will be used.</p>
- <p>If you have a single string containing both a filename and parameters (e.g. a command line obtained from an UninstallString registry value), you need not separate them yourself; just pass <tt>'>'</tt> in the Filename parameter, and the full command line in the Params parameter. (Note that when this is done, the function's special platform-independent support for .bat and .cmd files is disabled; it simply passes the specified command line to CreateProcess without any processing.)</p>
- <p>By default, when Setup/Uninstall is running in <link topic="32vs64bitinstalls">64-bit install mode</link>, this function disables WOW64 file system redirection when calling CreateProcess. It is possible to override this by calling <link topic="isxfunc_EnableFsRedirection">EnableFsRedirection</link>.</p>
- <p>Can't be used to execute Setup itself until the installation has started.</p>
- <p><i>Note: compared to ISPP's Exec the ShowCmd and Wait parameters are swapped!</i></p></remarks>
- <example><pre>var
- ResultCode: Integer;
- begin
- // Launch Notepad and wait for it to terminate
- if Exec(ExpandConstant('{win}\notepad.exe'), '', '', SW_SHOWNORMAL,
- ewWaitUntilTerminated, ResultCode) then
- begin
- // handle success if necessary; ResultCode contains the exit code
- end
- else begin
- // handle failure if necessary; ResultCode contains the error code
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_ExecAndCaptureOutput">ExecAndCaptureOutput</link><br />
- <link topic="isxfunc_ExecAndLogOutput">ExecAndLogOutput</link><br />
- <link topic="isxfunc_ExecAsOriginalUser">ExecAsOriginalUser</link></p></seealso>
- </function>
- <function>
- <name>ExecAsOriginalUser</name>
- <prototype>function ExecAsOriginalUser(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;</prototype>
- <description><p>Executes the specified executable or batch file, using the (normally non-elevated) credentials of the user that started Setup initially. See <link topic="isxfunc_Exec">Exec</link> and the [Run] section flag <tt>runasoriginaluser</tt> for more information.</p></description>
- <remarks><p>This function is not supported at uninstall time.</p>
- <p>In very unusual failure cases (e.g. if the initial Setup process died unexpectedly), it is possible for this function to raise an exception instead of just returning False.</p></remarks>
- </function>
- <function>
- <name>ShellExec</name>
- <prototype>function ShellExec(const Verb, Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ErrorCode: Integer): Boolean;</prototype>
- <description><p>Opens the specified file or performs another action specified by Verb, using the same credentials as Setup/Uninstall. The filename can be an executable file, a document file, a folder, or a URL. Verb may be an empty string, in which case the default verb for the file type is used (usually "open"). The Wait parameter specifies whether the function should return immediately or wait until the launched process has terminated or is idle. Returns True if the specified file was opened successfully, False otherwise. If False is returned then ErrorCode specifies the error that occurred. Use SysErrorMessage(ErrorCode) to get a description of the error.</p></description>
- <remarks><p>TExecWait is defined as:</p>
- <p><tt>TExecWait = (ewNoWait, ewWaitUntilTerminated, ewWaitUntilIdle);</tt></p>
- <p>Note that passing a Wait value other than <tt>ewNoWait</tt> will have no effect if a new process isn't spawned (for example, if the file is opened inside an already-running instance of the program that handles the file type).</p>
- <p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381.aspx">system error codes on MSDN</a>.</p>
- <p>Can't be used to execute Setup itself until the installation has started.</p></remarks>
- <example><pre>var
- ErrorCode: Integer;
- begin
- if not ShellExec('', ExpandConstant('{app}\filename.rtf'),
- '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode) then
- begin
- // handle failure if necessary
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_ShellExecAsOriginalUser">ShellExecAsOriginalUser</link></p></seealso>
- </function>
- <function>
- <name>ShellExecAsOriginalUser</name>
- <prototype>function ShellExecAsOriginalUser(const Verb, Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ErrorCode: Integer): Boolean;</prototype>
- <description><p>Opens the specified file or performs another action specified by Verb, using the (normally non-elevated) credentials of the user that started Setup initially. See <link topic="isxfunc_ShellExec">ShellExec</link> and the [Run] section flag <tt>runasoriginaluser</tt> for more information.</p></description>
- <remarks><p>This function is not supported at uninstall time.</p>
- <p>In very unusual failure cases (e.g. if the initial Setup process died unexpectedly), it is possible for this function to raise an exception instead of just returning False.</p>
- <p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381.aspx">system error codes on MSDN</a>.</p></remarks>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>ExtractTemporaryFile</name>
- <prototype>procedure ExtractTemporaryFile(const FileName: String);</prototype>
- <description><p>Extracts the specified file from the [Files] section to a temporary directory. To find the location of the temporary directory, use <tt>ExpandConstant('{tmp}')</tt>.</p>
- <p>The extracted files are automatically deleted when Setup exits.</p>
- <p>An exception will be raised if the file wasn't extracted successfully, if the file wasn't found, or if the file was found but couldn't be processed because of its MinVersion and/or OnlyBelowVersion parameters.</p></description>
- <remarks><p>Use <tt>Flags: dontcopy</tt> in the [Files] section to tell Setup to skip the file during the normal file copying stage.</p>
- <p>Use <tt>Flags: noencryption</tt> in the [Files] section if encryption is enabled and you call the ExtractTemporaryFile function prior to the user entering the correct password.</p>
- <p>When solid compression is enabled, be sure to list your temporary files at (or near) the top of the [Files] section. In order to extract an arbitrary file in a solid-compressed installation, Setup must first decompress all prior files (to a temporary buffer in memory). This can result in a substantial delay if a number of other files are listed above the specified file in the [Files] section.</p></remarks>
- <seealso><p><link topic="isxfunc_ExtractTemporaryFiles">ExtractTemporaryFiles</link><br />
- <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link></p></seealso>
- <example><pre>[Files]
- Source: "Readme.txt"; Flags: dontcopy noencryption
- [Code]
- function InitializeSetup: Boolean;
- var
- S: AnsiString;
- begin
- // Show the contents of Readme.txt (non Unicode) in a message box
- ExtractTemporaryFile('Readme.txt');
- if LoadStringFromFile(ExpandConstant('{tmp}\Readme.txt'), S) then
- begin
- MsgBox(S, mbInformation, MB_OK);
- end;
- Result := True;
- end;</pre></example>
- </function>
- <function>
- <name>ExtractTemporaryFiles</name>
- <prototype>function ExtractTemporaryFiles(const Pattern: String): Integer;</prototype>
- <description><p>Extracts the files matching the wildcard specified by Pattern from the [Files] section to a temporary directory. Returns the number of extracted files. To find the location of the temporary directory, use <tt>ExpandConstant('{tmp}')</tt>.</p>
- <p>The extracted files are automatically deleted when Setup exits.</p>
- <p>An exception will be raised if no files were extracted successfully, no files were found, or if files were found but none could be processed because of their MinVersion and/or OnlyBelowVersion parameters.</p></description>
- <remarks><p>Use <tt>Flags: dontcopy</tt> in the [Files] section to tell Setup to skip the file during the normal file copying stage.</p>
- <p>When solid compression is enabled, be sure to list your temporary files at (or near) the top of the [Files] section. In order to extract an arbitrary file in a solid-compressed installation, Setup must first decompress all prior files (to a temporary buffer in memory). This can result in a substantial delay if a number of other files are listed above the specified file in the [Files] section.</p></remarks>
- <seealso><p><link topic="isxfunc_ExtractTemporaryFile">ExtractTemporaryFile</link></p></seealso>
- <example><pre>[Files]
- Source: "Readme.txt"; Flags: dontcopy
- Source: "MyProg.exe"; DestDir: "{app}"
- Source: "MyProg.chm"; DestDir: "{app}"
- [Code]
- function InitializeSetup: Boolean;
- var
- S: AnsiString;
- ResultCode: Integer;
- begin
- // Show the contents of Readme.txt (non Unicode) in a message box
- ExtractTemporaryFiles('{tmp}\Readme.txt');
- if LoadStringFromFile(ExpandConstant('{tmp}\Readme.txt'), S) then
- begin
- MsgBox(S, mbInformation, MB_OK);
- end;
- // Extract all MyProg files and launch it. Note how {app} is left unexpanded.
- ExtractTemporaryFiles('{app}\MyProg.*');
- ExecAsOriginalUser(ExpandConstant('{tmp}\')+'{app}\MyProg.exe', '', '',
- SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
- Result := True;
- end;</pre></example>
- </function>
- <function>
- <name>DownloadTemporaryFile</name>
- <prototype>function DownloadTemporaryFile(const Url, BaseName, RequiredSHA256OfFile: String; const OnDownloadProgress: TOnDownloadProgress): Int64;</prototype>
- <description><p>Downloads the file from the specified URL to a temporary directory using the specified name. To find the location of the temporary directory, use <tt>ExpandConstant('{tmp}')</tt>.</p>
- <p>If RequiredSHA256OfFile is set it will compare this to the SHA-256 of the downloaded file and raise an exception if the hashes don't match.</p>
- <p>An exception will be raised if there was an error. Otherwise, returns the number of bytes downloaded. Returns 0 if RequiredSHA256OfFile is set and the file was already downloaded.</p>
- <p>Supports HTTPS (but not expired or self-signed certificates) and HTTP. Redirects are automatically followed and proxy settings are automatically used. Safe to use from services.</p>
- <p>For basic authentication use <link topic="isxfunc_SetDownloadCredentials">SetDownloadCredentials</link>.</p>
- <p>Set OnDownloadProgress to a function to be informed of progress, or <tt>nil</tt> otherwise.</p></description>
- <remarks><p>TOnDownloadProgress is defined as:</p>
- <p><tt>TOnDownloadProgress = function(const Url, FileName: String; const Progress, ProgressMax: Int64): Boolean;</tt></p>
- <p>ProgressMax will be 0 if the file size is still unknown. Return True to allow the download to continue, False otherwise.</p></remarks>
- <example><pre>
- [Code]
- function OnDownloadProgress(const Url, Filename: String; const Progress, ProgressMax: Int64): Boolean;
- begin
- if ProgressMax <> 0 then
- Log(Format(' %d of %d bytes done.', [Progress, ProgressMax]))
- else
- Log(Format(' %d bytes done.', [Progress]));
- Result := True;
- end;
- function InitializeSetup: Boolean;
- begin
- try
- DownloadTemporaryFile('https://jrsoftware.org/download.php/is.exe?dontcount=1', 'innosetup-latest.exe', '', @OnDownloadProgress);
- DownloadTemporaryFile('https://jrsoftware.org/download.php/iscrypt.dll?dontcount=1', 'ISCrypt.dll', '2f6294f9aa09f59a574b5dcd33be54e16b39377984f3d5658cda44950fa0f8fc', @OnDownloadProgress);
- Result := True;
- except
- Log(GetExceptionMessage);
- Result := False;
- end;
- end;</pre>
- <p>See <i>CodeDownloadFiles.iss</i> for another example which uses <link topic="isxfunc_CreateDownloadPage">CreateDownloadPage</link> instead.</p>
- <p>See <i>DownloadFiles.iss</i> for an example of file download using just a [Files] entry.</p></example>
- <seealso><p><link topic="isxfunc_SetDownloadCredentials">SetDownloadCredentials</link><br />
- <link topic="isxfunc_DownloadTemporaryFileWithISSigVerify">DownloadTemporaryFileWithISSigVerify</link><br />
- <link topic="isxfunc_DownloadTemporaryFileSize">DownloadTemporaryFileSize</link><br />
- <link topic="isxfunc_DownloadTemporaryFileDate">DownloadTemporaryFileDate</link><br />
- <link topic="isxfunc_CreateDownloadPage">CreateDownloadPage</link><br />
- <link topic="isxfunc_ExtractTemporaryFile">ExtractTemporaryFile</link><br />
- <link topic="isxfunc_ExtractArchive">ExtractArchive</link></p></seealso>
- </function>
- <function>
- <name>DownloadTemporaryFileWithISSigVerify</name>
- <prototype>function DownloadTemporaryFileWithISSigVerify(const Url, ISSigUrl, BaseName: String; const AllowedKeysRuntimeIDs: TStringList; const OnDownloadProgress: TOnDownloadProgress): Int64;</prototype>
- <description><p>Like <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link>, but downloads an .issig signature file first from the specified second URL and uses it to verify the main file downloaded from the first URL.</p>
- <p>If the second URL is an empty string, Setup will instead append ".issig" (without quotes) to the path portion of the first URL. It will then use the result as the URL to download the .issig signature file from.</p>
- <p>Verification uses the specified allowed keys, looked up using <link topic="issigkeyssection">[ISSigKeys] section</link> parameter <tt>RuntimeID</tt>. To allow all keys set AllowedKeysRuntimeIDs to <tt>nil</tt>.</p>
- <p>An exception will be raised if there was an error. Otherwise, returns the number of bytes downloaded for the main file from the first URL. Returns 0 if the main file was already downloaded and still verified.</p></description>
- <seealso><p><link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br/>
- <link topic="issig">.issig Signatures: Introduction</link><br/>
- <link topic="isxfunc_ISSigVerify">ISSigVerify</link></p></seealso>
- <example><pre>
- [Code]
- function InitializeSetup: Boolean;
- begin
- try
- DownloadTemporaryFileWithISSigVerify(
- 'https://jrsoftware.org/download.php/myprog-extrareadmes.7z', '',
- 'myprog-extrareadmes.7z', nil, nil);
- Result := True;
- except
- Log(GetExceptionMessage);
- Result := False;
- end;
- end;</pre></example>
- </function>
- <function>
- <name>SetDownloadCredentials</name>
- <prototype>procedure SetDownloadCredentials(const User, Pass: String);</prototype>
- <description><p>Sets the basic authentication username and password for all following downloads done by <tt>DownloadTemporaryFile</tt>, <tt>DownloadTemporaryFileWithISSigVerify</tt>, <tt>DownloadTemporaryFileSize</tt>, and <tt>DownloadTemporaryFileDate</tt>.</p>
- <p>Specify an empty username or password to unset the username or password.</p></description>
- <seealso><p><link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br/>
- <link topic="isxfunc_DownloadTemporaryFileWithISSigVerify">DownloadTemporaryFileWithISSigVerify</link><br/>
- <link topic="isxfunc_DownloadTemporaryFileSize">DownloadTemporaryFileSize</link><br/>
- <link topic="isxfunc_DownloadTemporaryFileDate">DownloadTemporaryFileDate</link></p></seealso>
- </function>
- <function>
- <name>DownloadTemporaryFileSize</name>
- <prototype>function DownloadTemporaryFileSize(const Url): Int64;</prototype>
- <description><p>Returns the size of the file from the specified URL, without downloading the file. If the server does not provide the size, -1 will be returned.</p>
- <p>An exception will be raised if there was an error.</p>
- <p>See <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link> for other considerations.</p></description>
- </function>
- <function>
- <name>DownloadTemporaryFileDate</name>
- <prototype>function DownloadTemporaryFileDate(const Url): String;</prototype>
- <description><p>Returns the last modified date of the file from the specified URL, without downloading the file. If the server does not provide the last modified file date, '' will be returned.</p>
- <p>An exception will be raised if there was an error.</p>
- <p>See <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link> for other considerations.</p></description>
- </function>
- <function>
- <name>ExtractArchive</name>
- <prototype>procedure ExtractArchive(const ArchiveFileName, DestDir, Password: String; const FullPaths: Boolean; const OnExtractionProgress: TOnExtractionProgress);</prototype>
- <description><p>Extracts the specified archive to the specified directory, with or without preserving full path names.</p>
- <p>An exception will be raised if there was an error.</p>
- <p>The supported archive formats, beyond .7z, and the support for password-protected and multi-volume archives, depend on the <link topic="setup_archiveextraction">ArchiveExtraction</link> [Setup] section directive.</p>
- <p>To allow the extraction of archives with custom extensions, such as self-extracting archives, call <link topic="isxfunc_MapArchiveExtensions">MapArchiveExtensions</link>.</p>
- <p>Set OnExtractionProgress to a function to be informed of progress, or <tt>nil</tt> otherwise.</p></description>
- <remarks><p>TOnExtractionProgress is defined as:</p>
- <p><tt>TOnExtractionProgress = function(const ArchiveName, FileName: String; const Progress, ProgressMax: Int64): Boolean;</tt></p>
- <p>Return True to allow the extraction to continue, False otherwise.</p></remarks>
- <example><p>See <i>DownloadFiles.iss</i> for an example of archive extraction using just a [Files] entry.</p></example>
- <seealso><p><link topic="isxfunc_CreateExtractionPage">CreateExtractionPage</link><br />
- <link topic="isxfunc_MapArchiveExtensions">MapArchiveExtensions</link><br />
- <link topic="isxfunc_CreateDownloadPage">CreateDownloadPage</link><br />
- <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br />
- <link topic="isxfunc_ExtractTemporaryFile">ExtractTemporaryFile</link></p></seealso>
- </function>
- <function>
- <name>MapArchiveExtensions</name>
- <prototype>procedure MapArchiveExtensions(const DestExt, SourceExt: String);</prototype>
- <description><p>Allows files with a specified destination extension, such as .exe, to be treated as if they have a different source extension, such as .7z, for extraction purposes.</p>
- <p>An exception will be raised if there was an error.</p></description>
- <remarks><p>Calls to this function are ignored if the <link topic="setup_archiveextraction">ArchiveExtraction</link> [Setup] section directive is set to <tt>basic</tt>.</p></remarks>
- <seealso><p><link topic="isxfunc_ExtractArchive">ExtractArchive</link><br/>
- <link topic="isxfunc_CreateExtractionPage">CreateExtractionPage</link></p></seealso>
- <example><pre>
- [Files]
- Source: "{src}\My7ZipSFX.exe; DestDir: "{app}"; Flags: external extractarchive recursesubdirs createallsubdirs ignoreversion
- [Code]
- function InitializeSetup: Boolean;
- begin
- MapArchiveExtensions('.exe', '.7z');
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetMD5OfFile</name>
- <prototype>function GetMD5OfFile(const Filename: String): String;</prototype>
- <description><p>Gets the MD5 sum of the specified file, as a string. An exception will be raised upon failure.</p></description>
- </function>
- <function>
- <name>GetSHA1OfFile</name>
- <prototype>function GetSHA1OfFile(const Filename: String): String;</prototype>
- <description><p>Gets the SHA-1 hash of the specified file, as a string. An exception will be raised upon failure.</p></description>
- </function>
- <function>
- <name>GetSHA256OfFile</name>
- <prototype>function GetSHA256OfFile(const Filename: String): String;</prototype>
- <description><p>Gets the SHA-256 hash of the specified file, as a string. An exception will be raised upon failure.</p></description>
- <seealso><p><link topic="isxfunc_GetSHA256OfStream">GetSHA256OfStream</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>ISSigVerify</name>
- <prototype>function ISSigVerify(const AllowedKeysRuntimeIDs: TStringList; const Filename: String; const VerifyFilename: Boolean; const KeepOpen: Boolean): TFileStream;</prototype>
- <description><p>Verifies the signature of the specified file using the specified allowed keys, looked up using <link topic="issigkeyssection">[ISSigKeys] section</link> parameter <tt>RuntimeID</tt>. To allow all keys set AllowedKeysRuntimeIDs to <tt>nil</tt>. An exception will be raised upon failure.</p>
- <p>If VerifyFilename is set to False the verification allows signatures for a different filename. It is recommended that you only set it to False if you don't know the name the file had when the signature was created. The size and hash of the file must always match.</p>
- <p>Returns a handle to the still open file if KeepOpen is set to True, <tt>nil</tt> otherwise. It is recommended that you always set it to True if you plan to use the file for anything after verification. Otherwise, you risk creating a Time-Of-Check to Time-Of-Use (TOCTOU) problem.</p></description>
- <example><pre>var
- F: TFileStream;
- begin
- F := ISSigVerify([], Filename, True);
- try
- // Use file
- finally
- F.Free;
- end;
- end;</pre></example>
- <seealso><p><link topic="issig">.issig Signatures: Introduction</link><br/>
- <link topic="isxfunc_DownloadTemporaryFileWithISSigVerify">DownloadTemporaryFileWithISSigVerify</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>RenameFile</name>
- <prototype>function RenameFile(const OldName, NewName: String): Boolean;</prototype>
- <description><p>Attempts to change the name of the file or directory specified by OldFile to NewFile. If the operation succeeds, RenameFile returns True. If it cannot rename the file (for example, if a file called NewName already exists), it returns False.</p></description>
- <remarks><p>Can't be used to rename Setup itself until the installation has started.</p></remarks>
- </function>
- <function>
- <name>CopyFile</name>
- <prototype>function CopyFile(const ExistingFile, NewFile: String; const FailIfExists: Boolean): Boolean;</prototype>
- <description><p>Copies ExistingFile to NewFile, preserving time stamp and file attributes.<br />If FailIfExists is True it will fail if NewFile already exists, otherwise it will overwrite it.<br />Returns True if successful, False otherwise.</p>
- <p>Files copied using <tt>CopyFile</tt> are not automatically uninstalled. Consider using a [Files] entry with the <tt>external</tt> flag set instead.</p></description>
- <remarks><p>Can't be used to copy Setup itself until the installation has started.</p></remarks>
- </function>
- <function>
- <name>DeleteFile</name>
- <prototype>function DeleteFile(const FileName: String): Boolean;</prototype>
- <description><p>Erases the file named by FileName from the disk.<br />If the file cannot be deleted or does not exist, the function returns False.</p></description>
- </function>
- <function>
- <name>DelayDeleteFile</name>
- <prototype>procedure DelayDeleteFile(const Filename: String; const Tries: Integer);</prototype>
- <description><p>Attempts to delete Filename, retrying up to Tries times if the file is in use. It delays 250 msec between tries.</p></description>
- </function>
- <function>
- <name>SetNTFSCompression</name>
- <prototype>function SetNTFSCompression(const FileOrDir: String; Compress: Boolean): Boolean;</prototype>
- <description><p>Changes the NTFS compression state of a file or directory. Returns True if successful.</p></description>
- <remarks><p>If a directory is specified, the compression state of any files present in the directory will not be changed.</p></remarks>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>LoadStringFromFile</name>
- <prototype>function LoadStringFromFile(const FileName: String; var S: AnsiString): Boolean;</prototype>
- <description><p>Loads the specified binary or non Unicode text file into the specified string. Returns True if successful, False otherwise.</p></description>
- <remarks><p>Use <link topic="isxfunc_LoadStringFromLockedFile">LoadStringFromLockedFile</link> to load even if the file is already opened for writing by another program.</p></remarks>
- <seealso><p><link topic="isxfunc_LoadStringsFromFile">LoadStringsFromFile</link></p></seealso>
- </function>
- <function>
- <name>LoadStringFromLockedFile</name>
- <prototype>function LoadStringFromLockedFile(const FileName: String; var S: AnsiString): Boolean;</prototype>
- <description><p>Loads the specified binary or non Unicode text file into the specified string, even if the file is already opened for writing by another program. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_LoadStringFromFile">LoadStringFromFile</link></p></seealso>
- </function>
- <function>
- <name>LoadStringsFromFile</name>
- <prototype>function LoadStringsFromFile(const FileName: String; var S: TArrayOfString): Boolean;</prototype>
- <description><p>Loads the specified text file into the specified string array. UTF-8 encoded files with or without a BOM are also supported. Returns True if successful, False otherwise.</p></description>
- <remarks><p>Use <link topic="isxfunc_LoadStringsFromLockedFile">LoadStringsFromLockedFile</link> to load even if the file is already opened for writing by another program.</p></remarks>
- <seealso><p><link topic="isxfunc_LoadStringFromFile">LoadStringFromFile</link></p></seealso>
- </function>
- <function>
- <name>LoadStringsFromLockedFile</name>
- <prototype>function LoadStringsFromLockedFile(const FileName: String; var S: TArrayOfString): Boolean;</prototype>
- <description><p>Loads the specified text file into the specified string array, even if the file is already opened for writing by another program. UTF-8 encoded files with or without a BOM are also supported. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_LoadStringsFromFile">LoadStringsFromFile</link></p></seealso>
- </function>
- <function>
- <name>SaveStringToFile</name>
- <prototype>function SaveStringToFile(const FileName: String; const S: AnsiString; const Append: Boolean): Boolean;</prototype>
- <description><p>Saves the specified string to the specified file. If Append is True and the specified file already exists, it will be appended to instead of overwritten. Returns True if successful, False otherwise.</p></description>
- <remarks><p>This function does not automatically write a line break before or after the string. If Append is True and the existing file did not end in a line break, the function will effectively append to the existing last line. To avoid this you can put line break characters before and/or after your string:</p>
- <p><tt>SaveStringToFile('c:\filename.txt', #13#10 + 'the string' + #13#10, True);</tt></p></remarks>
- </function>
- <function>
- <name>SaveStringsToFile</name>
- <prototype>function SaveStringsToFile(const FileName: String; const S: TArrayOfString; const Append: Boolean): Boolean;</prototype>
- <description><p>Saves the specified string array to the specified file with ASCII encoding. If Append is True and the specified file already exists, it will be appended to instead of overwritten. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_SaveStringsToUTF8File">SaveStringsToUTF8File</link><br />
- <link topic="isxfunc_SaveStringsToUTF8FileWithoutBOM">SaveStringsToUTF8FileWithoutBOM</link></p></seealso>
- </function>
- <function>
- <name>SaveStringsToUTF8File</name>
- <prototype>function SaveStringsToUTF8File(const FileName: String; const S: TArrayOfString; const Append: Boolean): Boolean;</prototype>
- <description><p>Saves the specified string array to the specified file with UTF-8 encoding with a BOM. If Append is True and the specified file already exists, it will be appended to instead of overwritten. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_SaveStringsToFile">SaveStringsToFile</link><br />
- <link topic="isxfunc_SaveStringsToUTF8FileWithoutBOM">SaveStringsToUTF8FileWithoutBOM</link></p></seealso>
- </function>
- <function>
- <name>SaveStringsToUTF8FileWithoutBOM</name>
- <prototype>function SaveStringsToUTF8FileWithoutBOM(const FileName: String; const S: TArrayOfString; const Append: Boolean): Boolean;</prototype>
- <description><p>Saves the specified string array to the specified file with UTF-8 encoding without a BOM. If Append is True and the specified file already exists, it will be appended to instead of overwritten. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_SaveStringsToFile">SaveStringsToFile</link><br />
- <link topic="isxfunc_SaveStringsToUTF8File">SaveStringsToUTF8File</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CreateDir</name>
- <prototype>function CreateDir(const Dir: String): Boolean;</prototype>
- <description><p>Creates a new directory. The return value is True if a new directory was successfully created, or False if an error occurred.</p></description>
- </function>
- <function>
- <name>ForceDirectories</name>
- <prototype>function ForceDirectories(Dir: String): Boolean;</prototype>
- <description><p>Creates all the directories along the specified directory path all at once. If the first directories in the path do exist, but the latter ones don't, ForceDirectories creates just the ones that don't exist. Returns True if successful, False otherwise.</p></description>
- </function>
- <function>
- <name>RemoveDir</name>
- <prototype>function RemoveDir(const Dir: String): Boolean;</prototype>
- <description><p>Deletes an existing empty directory. The return value is True if the empty directory was successfully deleted, or False if an error occurred.</p></description>
- </function>
- <function>
- <name>DelTree</name>
- <prototype>function DelTree(const Path: String; const IsDir, DeleteFiles, DeleteSubdirsAlso: Boolean): Boolean;</prototype>
- <description><p>Deletes the specified directory if IsDir is set to True, or files/directories matching a wildcard if IsDir is set to False. Returns True if it was able to successfully remove everything.</p>
- <p>If DeleteFiles is set to True, files inside the specified directory will be deleted if IsDir is True, or files matching the specified wildcard (including those with hidden, system, and read-only attributes) will be deleted if IsDir is False.</p>
- <p>If DeleteFiles and DeleteSubdirsAlso are both set to True, subdirectories (and their contents) will be deleted in addition to files.</p></description>
- <remarks><p>This function will remove directories that are reparse points, but it will not recursively delete files/directories inside them.</p></remarks>
- <example><pre>begin
- // Delete the directory C:\Test and everything inside it
- DelTree('C:\Test', True, True, True);
- // Delete files matching C:\Test\*.tmp
- DelTree('C:\Test\*.tmp', False, True, False);
- // Delete all files and directories inside C:\Test
- // but leave the directory itself
- DelTree('C:\Test\*', False, True, True);
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CreateShellLink</name>
- <prototype>function CreateShellLink(const Filename, Description, ShortcutTo, Parameters, WorkingDir, IconFilename: String; const IconIndex, ShowCmd: Integer): String;</prototype>
- <description><p>Creates a shortcut to a file or folder. Returns the resulting filename of the link, which may differ from <tt>Filename</tt> if it ended up creating a .pif file instead of a .lnk file. On failure, an exception will be raised.</p>
- <p><b>Parameters:</b><br />
- <i>Filename</i><br />Filename of the shortcut file to be created. This should be the full path and must end with ".lnk".<br />
- <i>Description</i><br />Description of the link. This will be displayed on a supporting OS when the user hovers the mouse over the file or shows the properties.<br />
- <i>ShortcutTo</i><br />Target file for the shortcut. This must be the full path to the file. Double quotation marks to surround the path will be added automatically.<br />
- <i>Parameters</i><br />Parameters to pass to the target file of the shortcut. Parameters which may include spaces should have double quote marks surrounding them. e.g. <tt>ExpandConstant('"{app}\foo"')</tt><br />
- <i>WorkingDir</i><br />Working directory for the target file. This should be set to an absolute directory.<br />
- <i>IconFilename</i><br />Path to file to supply the icon. If this is left as the empty string then the system default icon for the target file will be used.<br />
- <i>IconIndex</i><br />Zero-based index of the icon.<br />
- <i>ShowCmd</i><br />One of the SW_* constants</p></description>
- <remarks><p>You will most likely want to remove this shortcut on uninstall. Do this by adding an entry to the <tt>UninstallDelete</tt> section.</p></remarks>
- <example><pre>CreateShellLink(
- ExpandConstant('{app}\config\Open licence database.lnk'),
- 'Opens the licence database in SQLite',
- ExpandConstant('{app}\config\sqlite.exe'),
- ExpandConstant('"{app}\config\licences.db"'),
- ExpandConstant('{app}\config'),
- '',
- 0,
- SW_SHOWNORMAL);</pre></example>
- </function>
- <function>
- <name>UnpinShellLink</name>
- <prototype>function UnpinShellLink(const Filename: String): Boolean;</prototype>
- <description><p>Attempt to unpin the shortcut with the specified filename. Returns True if the shortcut was successfully removed from the list of pinned items and/or the taskbar, or if the shortcut was not pinned at all.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>RegisterServer</name>
- <prototype>procedure RegisterServer(const Is64Bit: Boolean; const Filename: String; const FailCriticalErrors: Boolean);</prototype>
- <description><p>Registers the DLL/OCX with the specified filename. If Is64Bit is True, the DLL/OCX will be loaded as a 64-bit image and registered in a 64-bit process. If FailCriticalErrors is True, the system will not display any critical-error-handler message boxes. Raises an exception if not successful.</p></description>
- <example><pre>begin
- // Register hhctrl.ocx located in the System directory.
- RegisterServer(Is64BitInstallMode, ExpandConstant('{sys}\hhctrl.ocx'), False);
- end;</pre>
- <p>Because we specify Is64BitInstallMode in the first parameter, it will register the 64-bit OCX in the 64-bit System directory when Setup is running in 64-bit install mode. Otherwise, it will register the 32-bit OCX in the 32-bit System directory.</p></example>
- </function>
- <function>
- <name>UnregisterServer</name>
- <prototype>function UnregisterServer(const Is64Bit: Boolean; const Filename: String; const FailCriticalErrors: Boolean): Boolean;</prototype>
- <description><p>Unregisters the DLL/OCX with the specified filename. If Is64Bit is True, the DLL/OCX will be loaded as a 64-bit image and unregistered in a 64-bit process. If FailCriticalErrors is True, the system will not display any critical-error-handler message boxes. Returns True if successful, False otherwise.</p></description>
- </function>
- <function>
- <name>RegisterTypeLibrary</name>
- <prototype>procedure RegisterTypeLibrary(const Is64Bit: Boolean; const Filename: String);</prototype>
- <description><p>Registers the type library with the specified filename. If Is64Bit is True, the type library will be registered in a 64-bit process. Raises an exception if not successful.</p></description>
- <example><pre>begin
- // Register stdole2.tlb located in the System directory.
- RegisterTypeLibrary(Is64BitInstallMode, ExpandConstant('{sys}\stdole2.tlb'));
- end;</pre>
- <p>Because we specify Is64BitInstallMode in the first parameter, it will register the 64-bit type library in the 64-bit System directory when Setup is running in 64-bit install mode. Otherwise, it will register the 32-bit type library in the 32-bit System directory.</p></example>
- </function>
- <function>
- <name>UnregisterTypeLibrary</name>
- <prototype>function UnregisterTypeLibrary(const Is64Bit: Boolean; const Filename: String): Boolean</prototype>
- <description><p>Unregisters the type library with the specified filename. If Is64Bit is True, the type library will be unregistered in a 64-bit process. Returns True if successful, False otherwise.</p></description>
- </function>
- <function>
- <name>IncrementSharedCount</name>
- <prototype>procedure IncrementSharedCount(const Is64Bit: Boolean; const Filename: String; const AlreadyExisted: Boolean);</prototype>
- <description><p>Increments or initializes the reference count for the specified file in the following registry key:</p>
- <p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs</p>
- <p>64-bit versions of Windows have two separate SharedDLLs keys, one for 64-bit files and one for 32-bit files. If Is64Bit is True, the 64-bit SharedDLLs key will be updated, otherwise the 32-bit SharedDLLs key will be updated. The setting of this parameter should correspond to the bitness of the file; for example, if it is a 32-bit DLL located in the 32-bit System directory, you should specify False. You may also specify <tt>Is64BitInstallMode</tt> in which case it will use the current install mode to determine which key to open.</p>
- <p>Pass True in the AlreadyExisted parameter if the file already exists; in this case the initial reference count for the file will be 2 if the value for the file doesn't already exist in the registry. (This behavior is in line with Microsoft's requirements.)</p>
- <p>An exception will be raised if the registry key cannot be opened for write access.</p></description>
- </function>
- <function>
- <name>DecrementSharedCount</name>
- <prototype>function DecrementSharedCount(const Is64Bit: Boolean; const Filename: String): Boolean;</prototype>
- <description><p>Decrements the reference count for the specified file in the following registry key:</p>
- <p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs</p>
- <p>64-bit versions of Windows have two separate SharedDLLs keys, one for 64-bit files and one for 32-bit files. If Is64Bit is True, the 64-bit SharedDLLs key will be updated, otherwise the 32-bit SharedDLLs key will be updated. The setting of this parameter should correspond to the bitness of the file; for example, if it is a 32-bit DLL located in the 32-bit System directory, you should specify False. You may also specify <tt>Is64BitInstallMode</tt> in which case it will use the current install mode to determine which key to open.</p>
- <p>Returns True if the count reached zero (meaning it's OK to delete the file). Returns False if the new count is greater than zero, or if the value for the file doesn't exist or is in an unrecognizable format.</p>
- <p>An exception will be raised if the registry key cannot be opened for write access.</p></description>
- </function>
- <function>
- <name>RestartReplace</name>
- <prototype>procedure RestartReplace(const TempFile, DestFile: String);</prototype>
- <description><p>Renames TempFile to DestFile the next time Windows is started. If DestFile already existed, it will be overwritten. If DestFile is '' then TempFile will be deleted. An exception will be raised upon failure.</p></description>
- </function>
- <function>
- <name>UnregisterFont</name>
- <prototype>procedure UnregisterFont(const FontName, FontFilename: String; const PerUserFont: Boolean);</prototype>
- <description><p>Unregisters the font with the specified face and filename.</p></description>
- </function>
- <function>
- <name>ModifyPifFile</name>
- <prototype>function ModifyPifFile(const Filename: String; const CloseOnExit: Boolean): Boolean;</prototype>
- <description><p>Changes the "Close on exit" setting of a .pif file. Returns True if it was able to make the change.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>File Version</description>
- <subcategory>
- <function>
- <name>GetVersionNumbers</name>
- <prototype>function GetVersionNumbers(const Filename: String; var VersionMS, VersionLS: Cardinal): Boolean;</prototype>
- <description><p>Gets the version numbers of the specified file. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_PackVersionNumbers">PackVersionNumbers</link></p></seealso>
- </function>
- <function>
- <name>GetVersionComponents</name>
- <prototype>function GetVersionComponents(const Filename: String; var Major, Minor, Revision, Build: Word): Boolean;</prototype>
- <description><p>Gets the individual version components of the specified file. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_PackVersionComponents">PackVersionComponents</link></p></seealso>
- </function>
- <function>
- <name>GetVersionNumbersString</name>
- <prototype>function GetVersionNumbersString(const Filename: String; var Version: String): Boolean;</prototype>
- <description><p>Gets the version of the specified file as a string (in "0.0.0.0" format). Returns True if successful, False otherwise.</p></description>
- </function>
- <function>
- <name>GetPackedVersion</name>
- <prototype>function GetPackedVersion(const Filename: String; var Version: Int64): Boolean;</prototype>
- <description><p>Gets the packed version of the specified file. Returns True if successful, False otherwise.</p>
- <p>Always use <link topic="isxfunc_ComparePackedVersion">ComparePackedVersion</link> or <link topic="isxfunc_SamePackedVersion">SamePackedVersion</link> to compare packed versions.</p></description>
- <seealso><p><link topic="isxfunc_PackVersionComponents">PackVersionComponents</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>PackVersionNumbers</name>
- <prototype>function PackVersionNumbers(const VersionMS, VersionLS: Cardinal): Int64;</prototype>
- <description><p>Packs version numbers into a single value.</p>
- <p>Always use <link topic="isxfunc_ComparePackedVersion">ComparePackedVersion</link> or <link topic="isxfunc_SamePackedVersion">SamePackedVersion</link> to compare packed versions.</p></description>
- <seealso><p><link topic="isxfunc_GetVersionNumbers">GetVersionNumbers</link><br />
- <link topic="isxfunc_PackVersionComponents">PackVersionComponents</link><br />
- <link topic="isxfunc_UnpackVersionNumbers">UnpackVersionNumbers</link></p></seealso>
- </function>
- <function>
- <name>PackVersionComponents</name>
- <prototype>function PackVersionComponents(const Major, Minor, Revision, Build: Word): Int64;</prototype>
- <description><p>Packs individual version components into a single value.</p>
- <p>Always use <link topic="isxfunc_ComparePackedVersion">ComparePackedVersion</link> or <link topic="isxfunc_SamePackedVersion">SamePackedVersion</link> to compare packed versions.</p></description>
- <seealso><p><link topic="isxfunc_GetVersionComponents">GetVersionComponents</link><br />
- <link topic="isxfunc_PackVersionNumbers">PackVersionNumbers</link><br />
- <link topic="isxfunc_UnpackVersionComponents">UnpackVersionComponents</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>ComparePackedVersion</name>
- <prototype>function ComparePackedVersion(const Version1, Version2: Int64): Integer;</prototype>
- <description><p>Compares Version1 to Version2. The return value is less than 0 if Version1 is less than Version2, 0 if Version1 equals Version2, or greater than 0 if Version1 is greater than Version2.</p></description>
- </function>
- <function>
- <name>SamePackedVersion</name>
- <prototype>function SamePackedVersion(const Version1, Version2: Int64): Boolean;</prototype>
- <description><p>Compares the packed versions Version1 and Version2 and returns True if they are equal.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>UnpackVersionNumbers</name>
- <prototype>procedure UnpackVersionNumbers(const Version: Int64; var VersionMS, VersionLS: Cardinal);</prototype>
- <description><p>Unpacks a packed version into version numbers.</p></description>
- <seealso><p><link topic="isxfunc_UnpackVersionComponents">UnpackVersionComponents</link><br />
- <link topic="isxfunc_PackVersionNumbers">PackVersionNumbers</link></p></seealso>
- </function>
- <function>
- <name>UnpackVersionComponents</name>
- <prototype>procedure UnpackVersionComponents(const Version: Int64; var Major, Minor, Revision, Build: Word);</prototype>
- <description><p>Unpacks a packed version into individual version components.</p></description>
- <seealso><p><link topic="isxfunc_UnpackVersionNumbers">UnpackVersionNumbers</link><br />
- <link topic="isxfunc_PackVersionComponents">PackVersionComponents</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>VersionToStr</name>
- <prototype>function VersionToStr(const Version: Int64): String;</prototype>
- <description><p>Returns the specified packed version as a string (in "0.0.0.0" format).</p></description>
- <seealso><p><link topic="isxfunc_StrToVersion">StrToVersion</link><br />
- <link topic="isxfunc_UnpackVersionNumbers">UnpackVersionNumbers</link><br />
- <link topic="isxfunc_UnpackVersionComponents">UnpackVersionComponents</link></p></seealso>
- </function>
- <function>
- <name>StrToVersion</name>
- <prototype>function StrToVersion(const Version: String; var Version: Int64): Boolean;</prototype>
- <description><p>Returns the specified string (in "0.0.0.0" format) as a packed version. Returns True if successful, False otherwise.</p></description>
- <seealso><p><link topic="isxfunc_VersionToStr">VersionToStr</link><br />
- <link topic="isxfunc_PackVersionNumbers">PackVersionNumbers</link><br />
- <link topic="isxfunc_PackVersionComponents">PackVersionComponents</link></p></seealso>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Registry</description>
- <subcategory>
- <function>
- <name>RegKeyExists</name>
- <prototype>function RegKeyExists(const RootKey: Integer; const SubKeyName: String): Boolean;</prototype>
- <description><p>Returns True if the specified registry key exists.</p></description>
- <example><pre>begin
- if RegKeyExists(HKEY_AUTO, 'Software\Jordan Russell\Inno Setup') then
- begin
- // The key exists
- end;
- end;</pre></example>
- </function>
- <function>
- <name>RegValueExists</name>
- <prototype>function RegValueExists(const RootKey: Integer; const SubKeyName, ValueName: String): Boolean;</prototype>
- <description><p>Returns True if the specified registry key and value exist.</p></description>
- <example><pre>begin
- if RegValueExists(HKEY_CURRENT_USER, 'Console', 'WindowSize') then
- begin
- // The value exists
- end;
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>RegGetSubkeyNames</name>
- <prototype>function RegGetSubkeyNames(const RootKey: Integer; const SubKeyName: String; var Names: TArrayOfString): Boolean;</prototype>
- <description><p>Opens the specified registry key and reads the names of its subkeys into the specified string array Names. Returns True if successful, False otherwise.</p></description>
- <example><pre>var
- Names: TArrayOfString;
- S: String;
- begin
- if RegGetSubkeyNames(HKEY_CURRENT_USER, 'Control Panel', Names) then
- begin
- S := StringJoin(#13#10, Names);
- MsgBox('List of subkeys:'#13#10#13#10 + S, mbInformation, MB_OK);
- end else
- begin
- // add any code to handle failure here
- end;
- end;</pre></example>
- </function>
- <function>
- <name>RegGetValueNames</name>
- <prototype>function RegGetValueNames(const RootKey: Integer; const SubKeyName: String; var Names: TArrayOfString): Boolean;</prototype>
- <description><p>Opens the specified registry key and reads the names of its values into the specified string array Names. Returns True if successful, False otherwise.</p></description>
- <example><pre>var
- Names: TArrayOfString;
- S: String;
- begin
- if RegGetValueNames(HKEY_CURRENT_USER, 'Control Panel\Mouse', Names) then
- begin
- S := StringJoin(#13#10, Names);
- MsgBox('List of values:'#13#10#13#10 + S, mbInformation, MB_OK);
- end else
- begin
- // add any code to handle failure here
- end;
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>RegQueryStringValue</name>
- <prototype>function RegQueryStringValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;</prototype>
- <description><p>Queries the specified REG_SZ- or REG_EXPAND_SZ-type value, and returns the data in ResultStr. Returns True if successful. When False is returned, ResultStr is unmodified.</p></description>
- <example><pre>var
- Country: String;
- begin
- if RegQueryStringValue(HKEY_CURRENT_USER, 'Control Panel\International',
- 'sCountry', Country) then
- begin
- // Successfully read the value
- MsgBox('Your country: ' + Country, mbInformation, MB_OK);
- end;
- end;</pre></example>
- </function>
- <function>
- <name>RegQueryMultiStringValue</name>
- <prototype>function RegQueryMultiStringValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;</prototype>
- <description><p>Queries the specified REG_MULTI_SZ-type registry value, and returns the data in ResultStr. Returns True if successful. When False is returned, ResultStr is unmodified.</p></description>
- <remarks><p>In a REG_MULTI_SZ-type value, each string is separated by a null character (<tt>#0</tt>).</p></remarks>
- </function>
- <function>
- <name>RegQueryDWordValue</name>
- <prototype>function RegQueryDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultDWord: Cardinal): Boolean;</prototype>
- <description><p>Queries the specified REG_DWORD-type registry value, and returns the data in ResultDWord. Returns True if successful. When False is returned, ResultDWord is unmodified.</p></description>
- <example><pre>var
- HistoryBufferSize: Cardinal;
- begin
- if RegQueryDWordValue(HKEY_CURRENT_USER, 'Console',
- 'HistoryBufferSize', HistoryBufferSize) then
- begin
- // Successfully read the value
- MsgBox('Console history buffer size: ' + IntToStr(HistoryBufferSize),
- mbInformation, MB_OK);
- end;
- end;</pre></example>
- </function>
- <function>
- <name>RegQueryBinaryValue</name>
- <prototype>function RegQueryBinaryValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: AnsiString): Boolean;</prototype>
- <description><p>Queries the specified registry value, and returns the data in ResultStr. Returns True if successful. When False is returned, ResultStr is unmodified.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>RegWriteStringValue</name>
- <prototype>function RegWriteStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;</prototype>
- <description><p>Writes the specified REG_SZ-type registry value. Returns True if successful, False otherwise.</p></description>
- <remarks><p>If the value already exists and is of type REG_EXPAND_SZ, the new value will also be of type REG_EXPAND_SZ. Otherwise, a REG_SZ-type value will be created.</p></remarks>
- <example><pre>begin
- RegWriteStringValue(HKEY_AUTO, 'Software\My Company\My Program',
- 'Language', ExpandConstant('{language}'));
- end;</pre></example>
- </function>
- <function>
- <name>RegWriteExpandStringValue</name>
- <prototype>function RegWriteExpandStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;</prototype>
- <description><p>Writes the specified REG_EXPAND_SZ-type registry value. Returns True if successful, False otherwise.</p></description>
- <example><pre>begin
- RegWriteStringValue(HKEY_CURRENT_USER, 'Software\My Company\My Program',
- 'UserName', '%UserName%);
- end;</pre></example>
- </function>
- <function>
- <name>RegWriteMultiStringValue</name>
- <prototype>function RegWriteMultiStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;</prototype>
- <description><p>Writes the specified REG_MULTI_SZ-type registry value. Returns True if successful, False otherwise.</p></description>
- <remarks><p>In a REG_MULTI_SZ-type value, each string is separated by a null character (<tt>#0</tt>).</p></remarks>
- <example><pre>begin
- RegWriteMultiStringValue(HKEY_AUTO, 'Software\My Company\My Program',
- 'MultiStringTest', 'String1' + #0 + 'String2' + #0 + 'String3');
- end;</pre></example>
- </function>
- <function>
- <name>RegWriteDWordValue</name>
- <prototype>function RegWriteDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; const Data: Cardinal): Boolean;</prototype>
- <description><p>Writes the specified REG_DWORD-type registry value. Returns True if successful, False otherwise.</p></description>
- <example><pre>begin
- RegWriteDWordValue(HKEY_AUTO, 'Software\My Company\My Program',
- 'ShowToolbar', 1);
- end;</pre></example>
- </function>
- <function>
- <name>RegWriteBinaryValue</name>
- <prototype>function RegWriteBinaryValue(const RootKey: Integer; const SubKeyName, ValueName: String; const Data: AnsiString): Boolean;</prototype>
- <description><p>Writes the specified REG_BINARY-type registry value. Returns True if successful, False otherwise.</p></description>
- <example><pre>begin
- RegWriteBinaryValue(HKEY_AUTO, 'Software\My Company\My Program',
- 'BinaryTest', 'Whatever' + #1#2#3#4);
- end;</pre></example>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>RegDeleteKeyIncludingSubkeys</name>
- <prototype>function RegDeleteKeyIncludingSubkeys(const RootKey: Integer; const SubkeyName: String): Boolean;</prototype>
- <description><p>Deletes the specified key and all subkeys. Returns True if successful, False otherwise.</p></description>
- </function>
- <function>
- <name>RegDeleteKeyIfEmpty</name>
- <prototype>function RegDeleteKeyIfEmpty(const RootKey: Integer; const SubkeyName: String): Boolean;</prototype>
- <description><p>Deletes the specified subkey if it has no subkeys or values. Returns True if successful, False otherwise.</p></description>
- </function>
- <function>
- <name>RegDeleteValue</name>
- <prototype>function RegDeleteValue(const RootKey: Integer; const SubKeyName, ValueName: String): Boolean;</prototype>
- <description><p>Deletes the specified value. Returns True if successful, False otherwise.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>INI File</description>
- <subcategory>
- <function>
- <name>IniKeyExists</name>
- <prototype>function IniKeyExists(const Section, Key, Filename: String): Boolean;</prototype>
- <description><p>Returns True if the specified INI key exists.</p></description>
- </function>
- <function>
- <name>IsIniSectionEmpty</name>
- <prototype>function IsIniSectionEmpty(const Section, Filename: String): Boolean;</prototype>
- <description><p>Returns True if the specified INI section is empty.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>GetIniBool</name>
- <prototype>function GetIniBool(const Section, Key: String; const Default: Boolean; const Filename: String): Boolean</prototype>
- <description><p>Reads a Boolean from an INI file.</p></description>
- </function>
- <function>
- <name>GetIniInt</name>
- <prototype>function GetIniInt(const Section, Key: String; const Default, Min, Max: LongInt; const Filename: String): LongInt;</prototype>
- <description><p>Reads a LongInt from an INI file. If the LongInt read is not between Min/Max then it returns Default. If Min=Max then Min/Max are ignored.</p></description>
- </function>
- <function>
- <name>GetIniString</name>
- <prototype>function GetIniString(const Section, Key, Default, Filename: String): String;</prototype>
- <description><p>Reads a String from an INI file.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>SetIniBool</name>
- <prototype>function SetIniBool(const Section, Key: String; const Value: Boolean; const Filename: String): Boolean;</prototype>
- <description><p>Writes a Boolean to an INI file.</p></description>
- </function>
- <function>
- <name>SetIniInt</name>
- <prototype>function SetIniInt(const Section, Key: String; const Value: LongInt; const Filename: String): Boolean;</prototype>
- <description><p>Writes a LongInt to an INI file.</p></description>
- </function>
- <function>
- <name>SetIniString</name>
- <prototype>function SetIniString(const Section, Key, Value, Filename: String): Boolean;</prototype>
- <description><p>Writes a string to an INI file.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>DeleteIniSection</name>
- <prototype>procedure DeleteIniSection(const Section, Filename: String);</prototype>
- <description><p>Deletes the specified section from an INI file.</p></description>
- </function>
- <function>
- <name>DeleteIniEntry</name>
- <prototype>procedure DeleteIniEntry(const Section, Key, Filename: String);</prototype>
- <description><p>Deletes the specified key from an INI file.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Custom Setup Wizard Page</description>
- <subcategory>
- <function>
- <name>CreateInputQueryPage</name>
- <prototype>function CreateInputQueryPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String): TInputQueryWizardPage;</prototype>
- <description><p>Creates a wizard page containing edit boxes.</p></description>
- <remarks><p>To create edit boxes on the page, call the Add method. Use the Values property to get/set the text of the edit boxes.</p></remarks>
- <example><pre>var
- Page: TInputQueryWizardPage;
- UserName, UserCompany: String;
- ...
- // Create the page
- Page := CreateInputQueryPage(wpWelcome,
- 'Personal Information', 'Who are you?',
- 'Please specify your name and the company for whom you work, then click Next.');
- // Add items (False means it's not a password edit)
- Page.Add('&Name:', False);
- Page.Add('&Company:', False);
- // Set initial values (optional)
- Page.Values[0] := ExpandConstant('{sysuserinfoname}');
- Page.Values[1] := ExpandConstant('{sysuserinfoorg}');
- ...
- // Read values into variables
- UserName := Page.Values[0];
- UserCompany := Page.Values[1];
- </pre>
- <p>See <i>AllPagesExample.iss</i> for another example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TInputQueryWizardPage">TInputQueryWizardPage</link></p></seealso>
- </function>
- <function>
- <name>CreateInputOptionPage</name>
- <prototype>function CreateInputOptionPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; Exclusive, ListBox: Boolean): TInputOptionWizardPage;</prototype>
- <description><p>Creates a wizard page containing check boxes or radio buttons.</p>
- <p>If Exclusive is True, radio buttons are displayed instead of check boxes, and only one item in the list may be selected at a time. If ListBox is True, the check boxes or radio buttons are placed inside a scrollable list box.</p></description>
- <remarks><p>To create check boxes / radio buttons on the page, call the Add method. Use the Values property to get/set the checked state of items. On pages created with Exclusive=True, you can get/set the index of the one selected item via the SelectedValueIndex property.</p></remarks>
- <example><pre>var
- Page: TInputOptionWizardPage;
- IsRegisteredUser: Boolean;
- ...
- // Create the page
- Page := CreateInputOptionPage(wpWelcome,
- 'License Information', 'Are you a registered user?',
- 'If you are a registered user, please check the box below, then click Next.',
- False, False);
- // Add items
- Page.Add('&I am a registered user');
- // Set initial values (optional)
- Page.Values[0] := False;
- ...
- // Read values into variables
- IsRegisteredUser := Page.Values[0];
- </pre>
- <p>See <i>AllPagesExample.iss</i> for another example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TInputOptionWizardPage">TInputOptionWizardPage</link></p></seealso>
- </function>
- <function>
- <name>CreateInputDirPage</name>
- <prototype>function CreateInputDirPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; AAppendDir: Boolean; ANewFolderName: String): TInputDirWizardPage;</prototype>
- <description><p>Creates a wizard page that contains edit boxes and Browse buttons for selecting directories. If AAppendDir is True, the value of ANewFolderName will be appended onto any folder name the user clicks. If AAppendDir is False and ANewFolderName is not empty, a Make New Folder button will be shown that creates a new folder with the specified default name.</p></description>
- <remarks><p>To create directory selection boxes on the page, call the Add method. Use the Values property to get/set the items' values.</p></remarks>
- <example><pre>var
- Page: TInputDirWizardPage;
- DataDir: String;
- ...
- // Create the page
- Page := CreateInputDirPage(wpWelcome,
- 'Select Personal Data Location', 'Where should personal data files be stored?',
- 'Personal data files will be stored in the following folder.'#13#10#13#10 +
- 'To continue, click Next. If you would like to select a different folder, click Browse.',
- False, SetupMessage(msgNewFolderName));
- // Add item (with an empty caption)
- Page.Add('');
- // Set initial value (optional)
- Page.Values[0] := ExpandConstant('{userappdata}\My Company\My Program');
- ...
- // Read value into variable
- DataDir := Page.Values[0];
- </pre>
- <p>See <i>AllPagesExample.iss</i> for another example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TInputDirWizardPage">TInputDirWizardPage</link></p></seealso>
- </function>
- <function>
- <name>CreateInputFilePage</name>
- <prototype>function CreateInputFilePage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String): TInputFileWizardPage;</prototype>
- <description><p>Creates a wizard page that contains edit boxes and Browse buttons for selecting files.</p></description>
- <remarks><p>To create file selection boxes on the page, call the Add method. Use the Values property to get/set the items' values.</p>
- <p>An example Filter: 'Text files (*.txt)|*.txt|All files (*.*)|*.*'</p></remarks>
- <example><pre>var
- Page: TInputFileWizardPage;
- NotepadLocation: String;
- ...
- // Create the page
- Page := CreateInputFilePage(wpWelcome,
- 'Select Notepad Location', 'Where is Notepad located?',
- 'Select where Notepad is located, then click Next.');
- // Add item
- Page.Add('&Location of notepad.exe:', // caption
- 'Executable files|*.exe|All files|*.*', // filters
- '.exe'); // default extension
- // Set initial value (optional)
- Page.Values[0] := ExpandConstant('{win}\notepad.exe');
- ...
- // Read value into variable
- NotepadLocation := Page.Values[0];
- </pre>
- <p>See <i>AllPagesExample.iss</i> for another example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TInputFileWizardPage">TInputFileWizardPage</link></p></seealso>
- </function>
- <function>
- <name>CreateOutputMsgPage</name>
- <prototype>function CreateOutputMsgPage(const AfterID: Integer; const ACaption, ADescription, AMsg: String): TOutputMsgWizardPage;</prototype>
- <description><p>Creates a wizard page containing only static text. The AMsg parameter specifies the text to display.</p></description>
- <example><pre>var
- Page: TOutputMsgWizardPage;
- ...
- // Create the page
- Page := CreateOutputMsgPage(wpWelcome,
- 'Information', 'Please read the following important information before continuing.',
- 'Blah blah blah.');
- </pre>
- <p>See <i>AllPagesExample.iss</i> for another example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TOutputMsgWizardPage">TOutputMsgWizardPage</link></p></seealso>
- </function>
- <function>
- <name>CreateOutputMsgMemoPage</name>
- <prototype>function CreateOutputMsgMemoPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; const AMsg: AnsiString): TOutputMsgMemoWizardPage;</prototype>
- <description><p>Creates a wizard page containing static text as well as a read-only, multi-line edit control, capable of displaying RTF text. The ASubCaption parameter specifies the static text to display. AMsg specifies the text to assign to the edit control.</p></description>
- <example><pre>var
- Page: TOutputMsgMemoWizardPage;
- ...
- // Create the page
- Page := CreateOutputMsgMemoPage(wpWelcome,
- 'Information', 'Please read the following important information before continuing.',
- 'When you are ready to continue with Setup, click Next.',
- 'Blah blah blah.');
- </pre>
- <p>See <i>AllPagesExample.iss</i> for another example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TOutputMsgMemoWizardPage">TOutputMsgMemoWizardPage</link></p></seealso>
- </function>
- <function>
- <name>CreateOutputProgressPage</name>
- <prototype>function CreateOutputProgressPage(const ACaption, ADescription: String): TOutputProgressWizardPage;</prototype>
- <description><p>Creates a wizard page containing static text as well as a progress bar (which is hidden by default).</p>
- <p>Unlike the other types of wizard pages, progress pages are not displayed as part of the normal page sequence (note that there is no <tt>AfterID</tt> parameter). A progress page can only be displayed programmatically by calling its <tt>Show</tt> method.</p></description>
- <remarks><p>Call the <tt>Show</tt> method to activate and show the page. When you're finished with it, call the <tt>Hide</tt> method to revert to the previous page.</p>
- <p>Always put the <tt>Hide</tt> call inside the <tt>finally</tt> part of a <tt>try..finally</tt> language construct, as demonstrated in <i>CodeDlg.iss</i>. Not calling <tt>Hide</tt> will result in the wizard being permanently stuck on the progress page.</p>
- <p>To set the text on the page, call the <tt>SetText</tt> method. <tt>SetText</tt> takes two string parameters: use the first to tell the user what you're doing, and the second to display a file or directory name. Either parameter may be blank.</p>
- <p>To show or update the progress bar, call the <tt>SetProgress</tt> method. <tt>SetProgress</tt> takes two integer parameters: the first specifies the position of the progress bar (zero-based), and the second specifies the highest possible position. If the second parameter is 0, the progress bar will be hidden.</p></remarks>
- <example><p>See <i>CodeDlg.iss</i> and <i>AllPagesExample.iss</i> example scrips in the "Examples" subdirectory in your Inno Setup directory for examples.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TOutputProgressWizardPage">TOutputProgressWizardPage</link><br />
- <link topic="isxfunc_CreateOutputMarqueeProgressPage">CreateOutputMarqueeProgressPage</link></p></seealso>
- </function>
- <function>
- <name>CreateOutputMarqueeProgressPage</name>
- <prototype>function CreateOutputMarqueeProgressPage(const ACaption, ADescription: String): TOutputMarqueeProgressWizardPage;</prototype>
- <description><p>Creates a wizard page containing static text as well as a marquee progress bar.</p>
- <p>See <link topic="isxfunc_CreateOutputProgressPage">CreateOutputProgressPage</link> for information on how to work with progress pages.</p></description>
- <remarks><p>To animate the progress bar, call the <tt>Animate</tt> method. Do not call the <tt>SetProgress</tt> method, it will raise an internal error.</p></remarks>
- <example><p>See <i>AllPagesExample.iss</i> for an example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TOutputMarqueeProgressWizardPage">TOutputMarqueeProgressWizardPage</link></p></seealso>
- </function>
- <function>
- <name>CreateDownloadPage</name>
- <prototype>function CreateDownloadPage(const ACaption, ADescription: String; const OnDownloadProgress: TOnDownloadProgress): TDownloadWizardPage;</prototype>
- <description><p>Creates a wizard page to download files and show progress.</p>
- <p>Set OnDownloadProgress to a function to be informed of progress, or <tt>nil</tt> otherwise.</p>
- <p>Unlike the other types of wizard pages, progress pages are not displayed as part of the normal page sequence (note that there is no <tt>AfterID</tt> parameter). A progress page can only be displayed programmatically by calling its <tt>Show</tt> method.</p></description>
- <remarks><p>Call the <tt>Show</tt> method to activate and show the page. When you're finished with it, call the <tt>Hide</tt> method to revert to the previous page.</p>
- <p>Always put the <tt>Hide</tt> call inside the <tt>finally</tt> part of a <tt>try..finally</tt> language construct, as demonstrated in <i>CodeDownloadFiles.iss</i>. Not calling <tt>Hide</tt> will result in the wizard being permanently stuck on the progress page.</p>
- <p>To add a new file to download, call the <tt>Add</tt> method. Always call the <tt>Clear</tt> method before adding the first file.</p>
- <p>To start the download, call the <tt>Download</tt> method. An exception will be raised if there was an error. Otherwise, <tt>Download</tt> returns the number of bytes downloaded.</p>
- <p>Set the <tt>ShowBaseNameInsteadOfUrl</tt> property to <tt>True</tt> to show the base name of the file which is being downloaded to the user instead of the URL.</p>
- <p>See <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link> for other considerations and the definition of <tt>TOnDownloadProgress</tt>.</p></remarks>
- <example><p>See <i>CodeDownloadFiles.iss</i> for an example.</p>
- <p>See <i>DownloadFiles.iss</i> for an example of file download using just a [Files] entry instead.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TDownloadWizardPage">TDownloadWizardPage</link><br />
- <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br />
- <link topic="isxfunc_CreateOutputProgressPage">CreateOutputProgressPage</link></p></seealso>
- </function>
- <function>
- <name>CreateExtractionPage</name>
- <prototype>function CreateExtractionPage(const ACaption, ADescription: String; const OnExtractionProgress: TOnExtractionProgress): TExtractionWizardPage;</prototype>
- <description><p>Creates a wizard page to extract archives and show progress.</p>
- <p>The supported archive formats, beyond .7z, and the support for password-protected and multi-volume archives, depend on the <link topic="setup_archiveextraction">ArchiveExtraction</link> [Setup] section directive.</p>
- <p>To allow the extraction of archives with custom extensions, such as self-extracting archives, call <link topic="isxfunc_MapArchiveExtensions">MapArchiveExtensions</link>.</p>
- <p>Set OnExtractionProgress to a function to be informed of progress, or <tt>nil</tt> otherwise.</p>
- <p>Unlike the other types of wizard pages, progress pages are not displayed as part of the normal page sequence (note that there is no <tt>AfterID</tt> parameter). A progress page can only be displayed programmatically by calling its <tt>Show</tt> method.</p></description>
- <remarks><p>Call the <tt>Show</tt> method to activate and show the page. When you're finished with it, call the <tt>Hide</tt> method to revert to the previous page.</p>
- <p>Always put the <tt>Hide</tt> call inside the <tt>finally</tt> part of a <tt>try..finally</tt> language construct, as demonstrated in <i>CodeDownloadFiles.iss</i>. Not calling <tt>Hide</tt> will result in the wizard being permanently stuck on the progress page.</p>
- <p>To add a new archive to extract, call the <tt>Add</tt> method or the <tt>AddEx</tt> method if the archive is password-protected. Always call the <tt>Clear</tt> method before adding the first file.</p>
- <p>To start the extraction, call the <tt>Extract</tt> method. An exception will be raised if there was an error. Otherwise, <tt>Extract</tt> returns the number of archives extracted.</p>
- <p>Set the <tt>ShowArchiveInsteadFile</tt> property to <tt>True</tt> to show the name of the archive which is being extracted to the user instead of the names of the files inside the archive.</p>
- <p>See <link topic="isxfunc_ExtractArchive">ExtractArchive</link> for the definition of <tt>TOnExtractionProgress</tt>.</p></remarks>
- <example><p>See <i>CodeDownloadFiles.iss</i> for an example of <tt>CreateDownloadPage</tt> which works very similar to <tt>CreateExtractionPage</tt>.</p>
- <p>See <i>DownloadFiles.iss</i> for an example of archive extraction using just a [Files] entry instead.</p>
- </example>
- <seealso><p><link topic="scriptclasses" anchor="TExtractionWizardPage">TExtractionWizardPage</link><br />
- <link topic="isxfunc_ExtractArchive">ExtractArchive</link><br />
- <link topic="isxfunc_MapArchiveExtensions">MapArchiveExtensions</link><br />
- <link topic="isxfunc_CreateOutputProgressPage">CreateOutputProgressPage</link></p></seealso>
- </function>
- <function>
- <name>CreateCustomPage</name>
- <prototype>function CreateCustomPage(const AfterID: Integer; const ACaption, ADescription: String): TWizardPage;</prototype>
- <description><p>Creates a custom wizard page. The page is empty by default; you have to create your own controls afterward and place them on the page (by setting their Parent properties to the Surface property of the <link topic="scriptclasses" anchor="TWizardPage">TWizardPage</link> instance returned by this function).</p></description>
- <example><p>See <i>CodeClasses.iss</i> and <i>AllPagesExample.iss</i> example scripts in the "Examples" subdirectory in your Inno Setup directory for examples.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TWizardPage">TWizardPage</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CreateCustomForm</name>
- <prototype>function CreateCustomForm: TSetupForm;</prototype>
- <description><p>Creates a form. The form is empty by default; you have to create your own controls afterward and place them on the form (by setting their Parent properties to the <link topic="scriptclasses" anchor="TSetupForm">TSetupForm</link> instance returned by this function).</p></description>
- <remarks><p>You should call this function instead of creating <link topic="scriptclasses" anchor="TForm">TForm</link> or <link topic="scriptclasses" anchor="TSetupForm">TSetupForm</link> instances directly. This function automatically initializes the font and other properties of the created form to be like Setup's other dialogs.</p>
- <p>The <tt>[LangOptions]</tt> section's <tt>DialogFontName</tt> and <tt>DialogFontSize</tt> directives determine the font used by the form and, by default, any child controls created on the form.</p></remarks>
- <example><p>See <i>CodeClasses.iss</i> for an example.</p></example>
- <seealso><p><link topic="scriptclasses" anchor="TForm">TForm</link><br />
- <link topic="scriptclasses" anchor="TSetupForm">TSetupForm</link></p></seealso>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>PageFromID</name>
- <prototype>function PageFromID(const ID: Integer): TWizardPage;</prototype>
- <description><p>Given a page ID, returns a <link topic="scriptclasses" anchor="TWizardPage">TWizardPage</link> instance. Call this if, for example, you need to get at the surface of a page and only know its ID.</p>
- <p>An exception will be raised if an invalid page ID is specified.</p></description>
- <example><pre>var
- Page: TWizardPage;
- begin
- Page := PageFromID(wpWelcome);
- Page.Surface.Color := clBlue;
- end;</pre></example>
- <seealso><p><link topic="scriptclasses" anchor="TWizardPage">TWizardPage</link></p></seealso>
- </function>
- <function>
- <name>PageIndexFromID</name>
- <prototype>function PageIndexFromID(const ID: Integer): Integer;</prototype>
- <description><p>Given a page ID, returns an position index. Call this if, for example, you want to check whether a page is positioned before a certain other page.</p></description>
- <example><pre>function ShouldSkipPage(PageID: Integer): Boolean;
- begin
- Result := PageIndexFromID(PageID) < PageIndexFromID(wpReady);
- end;</pre></example>
- </function>
- <function>
- <name>ScaleX</name>
- <prototype>function ScaleX(X: Integer): Integer;</prototype>
- <description><p>Takes an X coordinate or width and returns it scaled to fit the size of the current dialog font. If the dialog font is 8-point MS Sans Serif and the user is running Windows in 100% DPI (96 dpi), then X is returned unchanged.</p></description>
- </function>
- <function>
- <name>ScaleY</name>
- <prototype>function ScaleY(Y: Integer): Integer;</prototype>
- <description><p>Takes a Y coordinate or height and returns it scaled to fit the size of the current dialog font. If the dialog font is 8-point MS Sans Serif and the user is running Windows in 100% DPI (96 dpi), then Y is returned unchanged.</p></description>
- </function>
- <function>
- <name>InitializeBitmapImageFromIcon</name>
- <prototype>function InitializeBitmapImageFromIcon(const BitmapImage: TBitmapImage; const IconFilename: String; const BkColor: TColor; const AscendingTrySizes: TArrayOfInteger): Boolean;</prototype>
- <description><p>Initializes the given bitmap image with an icon from the given icon file using the given background color for transparent parts.</p>
- <p>The bitmap image should be scaled already and the function will load the largest fitting icon which has a size from the given array of sizes. After loading the function will set the size of the bitmap image to the loaded size.</p>
- <p>The array must be sorted already from smallest to highest size.</p>
- <p>Returns True if the icon could be loaded, False otherwise.</p></description>
- <example><pre>procedure InitializeWizard;
- var
- Page: TWizardPage;
- BitmapImage: TBitmapImage;
- begin
- Page := CreateCustomPage(wpWelcome, 'Test', 'Test');
- BitmapImage := TBitmapImage.Create(Page);
-
- with BitmapImage do begin
- Width := ScaleX(32);
- Height := ScaleY(32);
- Parent := Page.Surface;
- end;
- InitializeBitmapImageFromIcon(BitmapImage, 'MyProg.ico', Page.SurfaceColor, [32, 48, 64]);
- end;</pre></example>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Dialog</description>
- <subcategory>
- <function>
- <name>MsgBox</name>
- <prototype>function MsgBox(const Text: String; const Typ: TMsgBoxType; const Buttons: Integer): Integer;</prototype>
- <description><p>Displays a message box. <tt>Text</tt> specifies the message to display. <tt>Typ</tt> specifies which icon to display in the message box. <tt>Buttons</tt> specifies which buttons to include in the message box. Returns an ID* constant indicating the button the user clicked, or 0 if the function fails (which shouldn't happen unless an invalid parameter is specified or system resources are exhausted).</p></description>
- <remarks><p>TMsgBoxType is defined as:</p>
- <p><tt>TMsgBoxType = (mbInformation, mbConfirmation, mbError, mbCriticalError);</tt></p>
- <p>Supported flags for <tt>Buttons</tt> are:</p>
- <p><tt>MB_OK, MB_OKCANCEL, MB_ABORTRETRYIGNORE, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_SETFOREGROUND</tt></p>
- <p>Possible return values are:</p>
- <p><tt>IDOK, IDCANCEL, IDABORT, IDRETRY, IDIGNORE, IDYES, IDNO</tt></p></remarks>
- <example><pre>begin
- // Display a simple message box with an OK button
- MsgBox('Hello.', mbInformation, MB_OK);
- // Ask the user a Yes/No question
- if MsgBox('Are you sure?', mbConfirmation, MB_YESNO) = IDYES then
- begin
- // user clicked Yes
- end;
- // Ask the user a Yes/No question, defaulting to No
- if MsgBox('Are you sure?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
- begin
- // user clicked Yes
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_SuppressibleMsgBox">SuppressibleMsgBox</link><br />
- <link topic="isxfunc_TaskDialogMsgBox">TaskDialogMsgBox</link></p></seealso>
- </function>
- <function>
- <name>SuppressibleMsgBox</name>
- <prototype>function SuppressibleMsgBox(const Text: String; const Typ: TMsgBoxType; const Buttons, Default: Integer): Integer;</prototype>
- <description><p>Displays a suppressible message box. If message boxes are being suppressed (see <link topic="setupcmdline" window="main">Setup Command Line Parameters</link>), <tt>Default</tt> is returned. Otherwise, SuppressibleMsgBox acts the same as the regular <link topic="isxfunc_MsgBox">MsgBox</link>.</p></description>
- </function>
- <function>
- <name>TaskDialogMsgBox</name>
- <prototype>function TaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer): Integer;</prototype>
- <description><p>Displays a message box using a task dialog:<br />
- <tt>Instruction</tt> specifies the instruction to display.<br />
- <tt>Text</tt> specifies the message to display.<br />
- <tt>Typ</tt> specifies which icon to display in the task dialog. If set to <tt>mbConfirmation</tt>, no icon will be displayed.<br />
- <tt>Buttons</tt> specifies which buttons to include in the task dialog.<br />
- <tt>ButtonLabels</tt> specifies which custom button labels to use. If set to an empty array, the system's default button labels will be used. If a label consists of two strings separated by a newline, then the first string specifies the button label and the second string specifies the button note. If <tt>Buttons</tt> is set to <tt>MB_OKCANCEL</tt>, <tt>MB_YESNOCANCEL</tt>, or <tt>MB_RETRYCANCEL</tt>, specifying a label for the Cancel button as the last element in the array is optional.<br />
- <tt>ShieldButton</tt> specifies which button to display a shield icon on. If set to 0, no shield icon will be displayed.</p>
- <p>Returns an ID* constant indicating the button the user clicked, or 0 if the function fails (which shouldn't happen unless an invalid parameter is specified or system resources are exhausted).</p></description>
- <remarks><p>TMsgBoxType is defined as:</p>
- <p><tt>TMsgBoxType = (mbInformation, mbConfirmation, mbError, mbCriticalError);</tt></p>
- <p>Supported values for <tt>Buttons</tt> are:</p>
- <p><tt>MB_OK, MB_OKCANCEL, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL, MB_ABORTRETRYIGNORE</tt></p>
- <p>If <tt>MB_ABORTRETRYIGNORE</tt> is used, <tt>ButtonLabels</tt> may not be an empty array and the button labels must be specified in the following special order: Retry, Ignore, Abort.</p>
- <p>Supported values for <tt>ShieldButton</tt> and possible return values are:</p>
- <p><tt>IDOK, IDCANCEL, IDRETRY, IDYES, IDNO, IDABORT, IDIGNORE</tt></p></remarks>
- <example><pre>begin
- case TaskDialogMsgBox('Choose A or B',
- 'You can choose A or B.',
- mbInformation,
- MB_YESNOCANCEL, ['I choose &A'#13#10'A will be chosen.', 'I choose &B'#13#10'B will be chosen.'],
- IDYES) of
- IDYES: MsgBox('You chose A.', mbInformation, MB_OK);
- IDNO: MsgBox('You chose B.', mbInformation, MB_OK);
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_SuppressibleTaskDialogMsgBox">SuppressibleTaskDialogMsgBox</link><br />
- <link topic="isxfunc_MsgBox">MsgBox</link></p></seealso>
- </function>
- <function>
- <name>SuppressibleTaskDialogMsgBox</name>
- <prototype>function SuppressibleTaskDialogMsgBox(const Instruction, Text: String; const Typ: TMsgBoxType; const Buttons: Cardinal; const ButtonLabels: TArrayOfString; const ShieldButton: Integer; const Default: Integer): Integer;</prototype>
- <description><p>Displays a suppressible message box using a task dialog. If message boxes are being suppressed (see <link topic="setupcmdline" window="main">Setup Command Line Parameters</link>), <tt>Default</tt> is returned. Otherwise, SuppressibleTaskDialogMsgBox acts the same as the regular <link topic="isxfunc_TaskDialogMsgBox">TaskDialogMsgBox</link>.</p></description>
- </function>
- <function>
- <name>GetOpenFileName</name>
- <prototype>function GetOpenFileName(const Prompt: String; var FileName: String; const InitialDirectory, Filter, DefaultExtension: String): Boolean;</prototype>
- <description><p>Displays a dialog box that enables the user to select an existing file. Returns True if the user selected a file, False otherwise. The name of the selected file is returned in the FileName string.</p></description>
- <remarks><p>An example Filter: 'Text files (*.txt)|*.txt|All files (*.*)|*.*'</p></remarks>
- <example><pre>var
- FileName: String;
- begin
- // Set the initial filename
- FileName := '';
- if GetOpenFileName('', FileName, '',
- 'Text Documents (*.txt)|*.txt|All Files|*.*', 'txt') then
- begin
- // Successful; user clicked OK
- // FileName contains the selected filename
- end;
- end;</pre></example>
- </function>
- <function>
- <name>GetOpenFileNameMulti</name>
- <prototype>function GetOpenFileNameMulti(const Prompt: String; var FileNameList: TStrings; const InitialDirectory, Filter, DefaultExtension: String): Boolean;</prototype>
- <description><p>Displays a dialog box that enables the user to select one or more existing file(s). Returns True if the user selected a file, False otherwise. The name of the selected file(s) is returned in the FileNameList list.</p></description>
- <remarks><p>An example Filter: 'Text files (*.txt)|*.txt|All files (*.*)|*.*'</p></remarks>
- <example><pre>var
- FileNameList: TStrings;
- begin
- // Create the list
- FileNameList := TStringList.Create;
- try
- if GetOpenFileNameMulti('', FileNameList, '',
- 'Text Documents (*.txt)|*.txt|All Files|*.*', 'txt') then
- begin
- // Successful; user clicked OK
- // FileNameList contains the selected filename(s)
- end;
- finally
- FileNameList.Free;
- end;
- end;</pre></example>
- </function>
- <function>
- <name>GetSaveFileName</name>
- <prototype>function GetSaveFileName(const Prompt: String; var FileName: String; const InitialDirectory, Filter, DefaultExtension: String): Boolean;</prototype>
- <description><p>Displays a dialog box that enables the user to select a new file. Returns True if the user selected a file, False otherwise. The name of the selected file is returned in the FileName string.</p></description>
- <remarks><p>An example Filter: 'Text files (*.txt)|*.txt|All files (*.*)|*.*'</p></remarks>
- <example><pre>var
- Filename: String;
- begin
- // Set the initial filename
- Filename := '';
- if GetSaveFileName('', Filename, '',
- 'Text Documents (*.txt)|*.txt|All Files|*.*', 'txt') then
- begin
- // Successful; user clicked OK
- // Filename contains the selected filename
- end;
- end;</pre></example>
- </function>
- <function>
- <name>BrowseForFolder</name>
- <prototype>function BrowseForFolder(const Prompt: String; var Directory: String; const NewFolderButton: Boolean): Boolean;</prototype>
- <description><p>Displays a dialog box that enables the user to select a directory. The current value of Directory is used as the initially selected directory. If NewFolderButton is True, a <i>New Folder</i> button will be shown, allowing the user to create new folders. Returns True if the user selected a directory and clicked OK, False otherwise. The selected directory is returned in the Directory string.</p></description>
- </function>
- <function>
- <name>ExitSetupMsgBox</name>
- <prototype>function ExitSetupMsgBox: Boolean;</prototype>
- <description><p>Displays the "Exit Setup?" message box, and returns True if the user selects Yes. Does not terminate Setup or Uninstall.</p></description>
- </function>
- <function>
- <name>SelectDisk</name>
- <prototype>function SelectDisk(const DiskNumber: Integer; const AFilename: String; var Path: String): Boolean;</prototype>
- <description><p>Displays the "Setup Needs the Next Disk" message box, and returns True if the user enters a path containing the file specified by AFileName and selects OK. The selected path is returned in the Path string. The current value of Path is used as the initially selected path and DiskNumber is used only as information to the user.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>COM Automation objects support</description>
- <subcategory>
- <function>
- <name>CreateOleObject</name>
- <prototype>function CreateOleObject(const ClassName: String): Variant;</prototype>
- <description><p>See the <link topic="scriptautomation" window="main">Using COM Automation objects</link> topic.</p></description>
- </function>
- <function>
- <name>GetActiveOleObject</name>
- <prototype>function GetActiveOleObject(const ClassName: String): Variant;</prototype>
- <description><p>See the <link topic="scriptautomation" window="main">Using COM Automation objects</link> topic.</p></description>
- </function>
- <function>
- <name>IDispatchInvoke</name>
- <prototype>function IDispatchInvoke(Self: IDispatch; PropertySet: Boolean; const Name: String; Par: array of Variant): Variant;</prototype>
- <description><p>Use <tt>IDispatchInvoke</tt> to access a COM Automation property or method whose name is a reserved word.</p></description>
- <example><pre>var
- AObject: Variant;
- AType: String;
- begin
- AObject := CreateOleObject('MyObject');
- // Set a property named 'Type'
- // Cannot use "AObject.Type := 'MyType';" because Type is a reserved word
- IDispatchInvoke(AObject, True, 'Type', ['MyType']);
- // Get a property or call a method named 'Type'
- AType := IDispatchInvoke(AObject, False, 'Type', ['']);
- end;</pre></example>
- <seealso><p><link topic="scriptautomation" window="main">Using COM Automation objects</link></p></seealso>
- </function>
- <function>
- <name>CreateComObject</name>
- <prototype>function CreateComObject(const ClassID: TGUID): IUnknown;</prototype>
- <description><p>See the <link topic="scriptautomation" window="main">Using COM Automation objects</link> topic.</p></description>
- </function>
- <function>
- <name>StringToGUID</name>
- <prototype>function StringToGUID(const S: String): TGUID;</prototype>
- <description><p>StringToGUID converts the string representation of a GUID into a 'real' GUID. An exception will be raised upon failure.</p></description>
- <seealso><p><link topic="scriptautomation" window="main">Using COM Automation objects</link></p></seealso>
- </function>
- <function>
- <name>OleCheck</name>
- <prototype>procedure OleCheck(Result: HResult);</prototype>
- <description><p>Use OleCheck to wrap any IUnknown based COM methods you call, so that if that method fails, an exception will be raised.</p></description>
- <seealso><p><link topic="scriptautomation" window="main">Using COM Automation objects</link></p></seealso>
- </function>
- <function>
- <name>CoFreeUnusedLibraries</name>
- <prototype>procedure CoFreeUnusedLibraries;</prototype>
- <description><p>See the <link topic="scriptautomation" window="main">Using COM Automation objects</link> topic.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Setup Logging</description>
- <subcategory>
- <function>
- <name>Log</name>
- <prototype>procedure Log(const S: String);</prototype>
- <description><p>Logs the specified string in Setup's or Uninstall's log file and/or in the Compiler IDE's "Debug Output" view.</p></description>
- <remarks><p>Calls to this function are ignored if logging is not enabled (via the <link topic="setupcmdline">/LOG</link> command line parameter or the <link topic="setup_setuplogging">SetupLogging</link> [Setup] section directive or the <link topic="setup_uninstalllogging">UninstallLogging</link> [Setup] section directive or debugging from the Compiler IDE).</p></remarks>
- </function>
- <function>
- <name>ExecAndCaptureOutput</name>
- <prototype>function ExecAndCaptureOutput(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer; var Output: TExecOutput): Boolean;</prototype>
- <description><p>Identical to <link topic="isxfunc_Exec">Exec</link> except:</p>
- <p>Program output from the stdout and stderr streams is captured. This is different from <link topic="isxfunc_ExecAndLogOutput">ExecAndLogOutput</link> which merges the streams.</p>
- <p>Console programs are always hidden and the ShowCmd parameter only affects GUI programs, so always using <tt>SW_SHOWNORMAL</tt> instead of <tt>SW_HIDE</tt> is recommended.</p>
- <p>An exception will be raised if there was an error setting up output redirection (which should be very rare).</p></description>
- <remarks><p>Parameter <tt>Wait</tt> must always be set to <tt>ewWaitUntilTerminated</tt> when calling this function.</p>
- <p>TExecOutput is defined as:</p>
- <pre>
- TExecOutput = record
- StdOut: TArrayOfString;
- StdErr: TArrayOfString;
- Error: Boolean;
- end;
- </pre>
- <p>Error will be True if there was an error reading the output (which should be very rare) or if the output is too big. The error is logged in Setup's or Uninstall's log file and/or in the Compiler IDE's "Debug Output" view. There is no further output after an error.</p>
- <p>Output is limited to a total size of 10 million bytes or a maximum of 1 million lines.</p></remarks>
- <example><pre>var
- ResultCode: Integer;
- Output: TExecOutput;
- begin
- try
- // Get the system configuration
- Result := ExecAndCaptureOutput(ExpandConstant('{cmd}'), '/c systeminfo', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode, Output);
- except
- Result := False;
- Log(GetExceptionMessage);
- end;
- if Result then begin
- // Do something with the Output.StdOut array of string
- end;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_Exec">Exec</link><br />
- <link topic="isxfunc_ExecAndLogOutput">ExecAndLogOutput</link></p></seealso>
- </function>
- <function>
- <name>ExecAndLogOutput</name>
- <prototype>function ExecAndLogOutput(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer; const OnLog: TOnLog): Boolean;</prototype>
- <description><p>Identical to <link topic="isxfunc_Exec">Exec</link> except:</p>
- <p>Console programs are always hidden and the ShowCmd parameter only affects GUI programs, so always using <tt>SW_SHOWNORMAL</tt> instead of <tt>SW_HIDE</tt> is recommended.</p>
- <p>If OnLog is set to <tt>nil</tt> then the output of the executed executable or batch file is logged in Setup's or Uninstall's log file and/or in the Compiler IDE's "Debug Output" view.</p>
- <p>If OnLog is not set to <tt>nil</tt> then the output is sent to the specified function, line by line.</p>
- <p>An exception will be raised if there was an error setting up output redirection (which should be very rare).</p></description>
- <remarks><p>Parameter <tt>Wait</tt> must always be set to <tt>ewWaitUntilTerminated</tt> when calling this function.</p>
- <p>TOnLog is defined as:</p>
- <p><tt>TOnLog = procedure(const S: String; const Error, FirstLine: Boolean);</tt></p>
- <p>Parameter S is the output line when Error is False, otherwise an error message. FirstLine is True if this is the first line of output from the program, otherwise False.</p>
- <p>Error will be True if reading the output failed (which should be very rare), or if the output is too big. There is no further output after an error.</p>
- <p>Output is limited to a total size of 10 million bytes or a maximum of 1 million lines.</p></remarks>
- <example><pre>var
- Line: String;
- procedure ExecAndGetFirstLineLog(const S: String; const Error, FirstLine: Boolean);
- begin
- if not Error and (Line = '') and (Trim(S) <> '') then
- Line := S; { First non-empty line found, store it }
- if FirstLine then
- Log('Output:');
- Log(S);
- end;
- function ExecAndGetFirstLine(const Filename, Params, WorkingDir: String; var ResultCode: Integer): String;
- begin
- Line := '';
- try
- ExecAndLogOutput(Filename, Params, WorkingDir, SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode, @ExecAndGetFirstLineLog);
- except
- Log(GetExceptionMessage);
- end;
- Result := Line;
- end;</pre></example>
- <seealso><p><link topic="isxfunc_Exec">Exec</link><br />
- <link topic="isxfunc_ExecAndCaptureOutput">ExecAndCaptureOutput</link></p></seealso>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Other</description>
- <subcategory>
- <function>
- <name>Sleep</name>
- <prototype>procedure Sleep(const Milliseconds: LongInt);</prototype>
- <description><p>Suspends the execution of Setup or Uninstall for a specified interval.</p></description>
- </function>
- <function>
- <name>Random</name>
- <prototype>function Random(const Range: Integer): Integer;</prototype>
- <description><p>Returns a random number within the range 0 <= X < Range.</p></description>
- </function>
- <function>
- <name>Beep</name>
- <prototype>procedure Beep;</prototype>
- <description><p>Beeps.</p></description>
- <example><pre>Beep; //Beeps</pre></example>
- </function>
- <function>
- <name>Set8087CW</name>
- <prototype>procedure Set8087CW(NewCW: Word);</prototype>
- <description><p>Sets the FPU control word.</p></description>
- <example><pre>Set8087CW($133f); //Disables all fpu exceptions }</pre></example>
- </function>
- <function>
- <name>Get8087CW</name>
- <prototype>function Get8087CW: Word;</prototype>
- <description><p>Returns the current value of the FPU control word.</p></description>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>BringToFrontAndRestore</name>
- <prototype>procedure BringToFrontAndRestore;</prototype>
- <description><p>Makes sure that Setup or Uninstall is visible and the foreground window.</p></description>
- </function>
- </subcategory>
- </category>
- <category>
- <description>Deprecated</description>
- <subcategory>
- <function>
- <name>LoadDLL</name>
- <prototype>function LoadDLL(const DLLName: String; var ErrorCode: Integer): LongInt;</prototype>
- <description><p>Loads the specified DLL. Returns the DLL handle if the DLL was loaded successfully, zero otherwise. If zero is returned then ErrorCode specifies the error that occurred. Use SysErrorMessage(ErrorCode) to get a description of the error.</p></description>
- <remarks><p>This function is deprecated. See the <link topic="scriptdll" window="main">Using DLLs</link> topic.</p>
- <p>Refer to the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms681381.aspx">system error codes on MSDN</a>.</p></remarks>
- </function>
- <function>
- <name>CallDLLProc</name>
- <prototype>function CallDLLProc(const DLLHandle: LongInt; const ProcName: String; const Param1, Param2: LongInt; var Result: LongInt): Boolean;</prototype>
- <description><p>Calls the specified function in a DLL specified using the DLL handle returned by LoadDLL. Returns True is the procedure was called successfully, False otherwise.<br />The function must use the standard calling convention, accept two 4 byte integer parameters and return a 4 byte integer result.</p></description>
- <remarks><p>This function is deprecated. See the <link topic="scriptdll" window="main">Using DLLs</link> topic.</p></remarks>
- </function>
- <function>
- <name>FreeDLL</name>
- <prototype>function FreeDLL(const DLLHandle: LongInt): Boolean;</prototype>
- <description><p>Unloads a DLL specified using the DLL handle returned by LoadDLL.</p></description>
- <remarks><p>This function is deprecated. See the <link topic="scriptdll" window="main">Using DLLs</link> topic.</p></remarks>
- </function>
- </subcategory>
- <subcategory>
- <function>
- <name>CastStringToInteger</name>
- <prototype>function CastStringToInteger(var S: String): LongInt;</prototype>
- <description><p>Casts a string to an integer so that a string can be passed to a DLL using CallDllProc.</p></description>
- <remarks><p>This function is deprecated. See the <link topic="scriptdll" window="main">Using DLLs</link> topic.</p></remarks>
- </function>
- <function>
- <name>CastIntegerToString</name>
- <prototype>function CastIntegerToString(const L: LongInt): String;</prototype>
- <description><p>Casts an integer to a string so that a string can be received from a DLL using CallDllProc.</p></description>
- <remarks><p>This function is deprecated. See the <link topic="scriptdll" window="main">Using DLLs</link> topic.</p></remarks>
- </function>
- </subcategory>
- </category>
- </isxfunc>
- <isxenum>
- <enum>
- <description>Exec and ShellExec - ShowCmd values</description>
- <values>SW_SHOW, SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED, SW_SHOWMINNOACTIVE, SW_HIDE</values>
- </enum>
- <enum>
- <description>MsgBox - Buttons flags</description>
- <values>MB_OK, MB_OKCANCEL, MB_ABORTRETRYIGNORE, MB_YESNOCANCEL, MB_YESNO, MB_RETRYCANCEL, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON3, MB_SETFOREGROUND</values>
- </enum>
- <enum>
- <description>MsgBox - return values</description>
- <values>IDOK, IDCANCEL, IDABORT, IDRETRY, IDIGNORE, IDYES, IDNO</values>
- </enum>
- <enum>
- <description>Reg* - RootKey values (also see the <link topic="registrysection" window="main">[Registry]</link> section documentation)</description>
- <values>HKEY_AUTO, HKEY_AUTO_32, HKEY_AUTO_64,<br />HKEY_CLASSES_ROOT, HKEY_CLASSES_ROOT_32, HKEY_CLASSES_ROOT_64,<br />HKEY_CURRENT_USER, HKEY_CURRENT_USER_32, HKEY_CURRENT_USER_64,<br />HKEY_LOCAL_MACHINE, HKEY_LOCAL_MACHINE_32, HKEY_LOCAL_MACHINE_64,<br />HKEY_USERS, HKEY_USERS_32, HKEY_USERS_64,<br />HKEY_PERFORMANCE_DATA,<br />HKEY_CURRENT_CONFIG, HKEY_CURRENT_CONFIG_32, HKEY_CURRENT_CONFIG_64,<br />HKEY_DYN_DATA,<br />HKA, HKA32, HKA64, HKCR, HKCR32, HKCR64, HKCU, HKCU32, HKCU64, HKLM, HKLM32, HKLM64, HKU, HKU32, HKU64, HKCC, HKCC32, HKCC64</values>
- </enum>
- </isxenum>
- </isxhelp>
|