Re: jscript to find file version




Serge Baltic wrote:
> Hello,
>
> > The Version: can be obtained using fso.GetVersionInfo but the File
> > version: requires a long program shown in vbscript at:
>
> -----------------
> import System.Diagnostics;
>
> var version = FileVersionInfo.GetVersionInfo("c:\\Windows\\Notepad.exe");
>
> print("File version is " + version.FileVersion);
> print("Product version is " + version.ProductVersion);
> -----------------
> File version is 5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
> Product version is 5.1.2600.2180
> -----------------

That would be much better than the program I mentioned from
the internet; however I don't really understand what is going on.

I tried creating a file called prodver.hta containing this
but it gave me a syntax error on line 9, the import
statement -- is that a valid statement???

<html>
<head>
</head>
<body>
<script language = jscript>

import System.Diagnostics;
var version =
FileVersionInfo.GetVersionInfo("c:\\Windows\\Notepad.exe");

document.write("File version is " + version.FileVersion);
document.write("Product version is " + version.ProductVersion);

</script>
</body>

</html>

.



Relevant Pages

  • JScript for the For Each Next statement in VBScript
    ... I am trying to learn JScript but I am finding it a bit difficult. ... I have this code in VBScript that works fine: ... var rf = Request.Form; ... Prev by Date: ...
    (microsoft.public.scripting.jscript)
  • Re: JScript for the For Each Next statement in VBScript
    ... > I just remembered that JScript doesn't have a direct equivalent of ... > var rf = Request.Form; ... You also forgot that JScript is case sensitive... ... Prev by Date: ...
    (microsoft.public.scripting.jscript)
  • Re: JScript for the For Each Next statement in VBScript
    ... I just remembered that JScript doesn't have a direct equivalent of the For ... var rf = Request.Form; ... Prev by Date: ...
    (microsoft.public.scripting.jscript)
  • Re: Parameter modification
    ... I need to do this using JSCript .Net, so if it is possible using that but not regular JSCript, then that would work for me. ... var mb; ... I am not trying to pass a number to be provided; I am actually trying to pass a MenuItem to be created. ... menuFile = new MenuItem; ...
    (microsoft.public.scripting.jscript)
  • Re: Windows CE 5.0 ASP Server memory leak
    ... I've spoken with our JScript dev about this, ... I read it seams that the dll is unloaded only after 30 minutes. ... var Enable_Telnet = ... AccessRight = ...
    (microsoft.public.windowsce.platbuilder)

Loading