PageRenderTime 35ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

/AutoHotkey.docset/Contents/Resources/Documents/commands/FileGetVersion.htm

https://gitlab.com/ahkscript/Autohotkey.docset
HTML | 42 lines | 33 code | 9 blank | 0 comment | 0 complexity | 0b54a2eb6a931f7d3583acde588feebd MD5 | raw file
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>FileGetVersion</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <link href="../static/theme.css" rel="stylesheet" type="text/css" />
  8. <script src="../static/content.js" type="text/javascript"></script>
  9. </head>
  10. <body>
  11. <h1>FileGetVersion</h1>
  12. <p>Retrieves the version of a file.</p>
  13. <pre class="Syntax">FileGetVersion, OutputVar [, Filename]</pre>
  14. <h3>Parameters</h3>
  15. <dl>
  16. <dt>OutputVar</dt>
  17. <dd><p>The name of the variable in which to store the version number/string.</p></dd>
  18. <dt>Filename</dt>
  19. <dd><p>The name of the target file. If a full path is not specified, this function uses the search sequence specified by the system <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175">LoadLibrary</a> function. If omitted, the current file of the innermost enclosing <a href="LoopFile.htm">File-Loop</a> will be used instead.</p></dd>
  20. </dl>
  21. <h3>ErrorLevel</h3>
  22. <p><span class="ver">[v1.1.04+]</span> This command is able to throw an exception on failure. For more information, see <a href="Catch.htm#RuntimeErrors">Runtime Errors</a>.</p>
  23. <p><a href="../misc/ErrorLevel.htm">ErrorLevel</a> is set to 1 if there was a problem or 0 otherwise.</p>
  24. <p><a href="../Variables.htm#LastError">A_LastError</a> is set to the result of the operating system's GetLastError() function.</p>
  25. <h3>Remarks</h3>
  26. <p>Most non-executable files (and even some EXEs) won't have a version, and thus the OutputVar will be blank in these cases.</p>
  27. <h3>Related</h3>
  28. <p><a href="FileGetAttrib.htm">FileGetAttrib</a>, <a href="FileSetAttrib.htm">FileSetAttrib</a>, <a href="FileGetTime.htm">FileGetTime</a>, <a href="FileSetTime.htm">FileSetTime</a>, <a href="FileGetSize.htm">FileGetSize</a>, <a href="LoopFile.htm">File-loop</a></p>
  29. <h3>Example</h3>
  30. <pre class="NoIndent">FileGetVersion, version, C:\My Application.exe
  31. FileGetVersion, version, %A_ProgramFiles%\AutoHotkey\AutoHotkey.exe</pre>
  32. </body>
  33. </html>