Thara
Tue Jul 20 03:43:47 CDT 2004
:-) It works Thanks !!! .....
Anyway WScript.Echo "MS JVM is installed." didnt work and i put a msgbox to
check it.....
Thanks again
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:%23RFgAghbEHA.712@TK2MSFTNGP11.phx.gbl...
> Thara DK wrote:
>
> > How can I determine whether the Microsoft Java Virtual Machine (JVM) is
> > installed on my computer
> > Programmatically by using Vb Scripy...?
> Hi
>
>
> If IsMSJVMInstalled Then
> WScript.Echo "MS JVM is installed."
> Else
> WScript.Echo "MS JVM is not installed."
> End If
>
> Function IsMSJVMInstalled
> Dim oShell, sRegValue, RegReadReturn
> Set oShell = CreateObject("WScript.Shell")
> sRegValue = _
>
"HKCR\CLSID\{08B0E5C0-4FCB-11CF-AAA5-00401C608500}\InstalledVersion\"
> IsMSJVMInstalled = True ' init value
> On Error Resume Next
> RegReadReturn = oShell.RegRead(sRegValue)
> If Err.Number <> 0 Then
> IsMSJVMInstalled = False
> End if
> On Error Goto 0
> End Function
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
>
http://www.microsoft.com/technet/scriptcenter/default.mspx