Hi All,

I am trying to find a script to tell on a number of computers if java
is installed and is what version. We are trying to determine what dst
patched we need to apply for java.

I know I can run java -version remotely but how do I get the response
back from that to a file/log.

Thanks
Mike

Re: script to determine java install and version by JHP

JHP
Fri Feb 23 14:33:48 CST 2007

Not sure if this is part of what your looking for:

Set objFSO = CreateObject("Scripting.FileSystemObject")
rtnVersion = objFSO.GetFileVersion("C:\WINDOWS\system32\java.exe")
Set objFSO = Nothing
WScript.Echo "Jave Version: " & rtnVersion

"mike d" <mike.drewery@gmail.com> wrote in message
news:1172245527.006210.70520@m58g2000cwm.googlegroups.com...
> Hi All,
>
> I am trying to find a script to tell on a number of computers if java
> is installed and is what version. We are trying to determine what dst
> patched we need to apply for java.
>
> I know I can run java -version remotely but how do I get the response
> back from that to a file/log.
>
> Thanks
> Mike
>




Re: script to determine java install and version by mike

mike
Fri Feb 23 15:20:22 CST 2007

I guess it would have helped had I posted what I have:

strComputers = Split(strComputers, vbCrLf)

For x = 0 to UBound(strComputers)
Set refWMI = GetObject("Winmgmts:{impersonationLevel=impersonate}!\\"
& CStr(strComputers(x)))
Set refProcess = refWMI.Get("Win32_Process")
refProcess.Create "java -version 2>>\\turbo\c$\1.txt"
Next


I am trying to right the value out to a file on my local pc. This
needs to hit pc's remotely. Like I said he have many flavors of java
around and I need to see what I will have to patch. I wanted to look
at reg keys but was afraid there would be too many variables with the
different versions.






On Feb 23, 3:33 pm, "JHP" <goaways...@GFY.com> wrote:
> Not sure if this is part of what your looking for:
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> rtnVersion = objFSO.GetFileVersion("C:\WINDOWS\system32\java.exe")
> Set objFSO = Nothing
> WScript.Echo "Jave Version: " & rtnVersion
>
> "mike d" <mike.drew...@gmail.com> wrote in message
>
> news:1172245527.006210.70520@m58g2000cwm.googlegroups.com...
>
>
>
> > Hi All,
>
> > I am trying to find a script to tell on a number of computers if java
> > is installed and is what version. We are trying to determine what dst
> > patched we need to apply for java.
>
> > I know I can run java -version remotely but how do I get the response
> > back from that to a file/log.
>
> > Thanks
> > Mike- Hide quoted text -
>
> - Show quoted text -



Re: script to determine java install and version by Michael

Michael
Fri Feb 23 19:30:35 CST 2007

JHP wrote:
> Not sure if this is part of what your looking for:
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> rtnVersion = objFSO.GetFileVersion("C:\WINDOWS\system32\java.exe")
> Set objFSO = Nothing
> WScript.Echo "Jave Version: " & rtnVersion
>

A more OS-neutral version...

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Set envProcess = objShell.Environment("process")
windir = envProcess.Item("windir")
rtnVersion = objFSO.GetFileVersion(windir & "\system32\java.exe")
Set objFSO = Nothing
WScript.Echo "Jave Version: " & rtnVersion


--
Michael Harris
Microsoft.MVP.Scripting



Re: script to determine java install and version by mr_unreliable

mr_unreliable
Mon Feb 26 11:26:41 CST 2007

Michael Harris (MVP) wrote:
> A more OS-neutral version...
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objShell = CreateObject("WScript.Shell")
> Set envProcess = objShell.Environment("process")
> windir = envProcess.Item("windir")
> rtnVersion = objFSO.GetFileVersion(windir & "\system32\java.exe")
> Set objFSO = Nothing
> WScript.Echo "Jave Version: " & rtnVersion
>

For those poor unfortunates who still use win98,
java.exe may be found here: "c:\windows\java.exe".

cheers, jw