Thank you for responding,
I have hit a wall and it seems so simple, but I just can't get it. I have to run a Java update. The script needs to look in the registry, see version 7.x and then do something. If the RegRead returns a value of 1.7.0_15 then stop.
If RegRead returns any other version 7, then continue on and run the install. Everything else in my code is working fine, except being able to identify the product code and do the next thing: Close or install.
Here is part of my code:
everything below this works fine and the install file works fine as well. I placed message boxes in the code so I could track the code and they will be removed later. Any ideas would be great.
Cheers
I have hit a wall and it seems so simple, but I just can't get it. I have to run a Java update. The script needs to look in the registry, see version 7.x and then do something. If the RegRead returns a value of 1.7.0_15 then stop.
If RegRead returns any other version 7, then continue on and run the install. Everything else in my code is working fine, except being able to identify the product code and do the next thing: Close or install.
Here is part of my code:
#RequireAdmin Local $a = "C:\Windows\Temp\" Dim $var2 = "1.7.0_15" Local $b = "C:\Users\" Local $Sun = "C:\Users\" & @UserName & "\AppData\LocalLow\Sun\Java\Deployment\" Local $Sun2 = "C:\Users\" & @UserName & "\AppData\LocalLow\Sun\Java\Deployment\security\" Local $Sun3 = "C:\Users\" & @UserName & "\AppData\LocalLow\Sun\Java\Deployment\tmp\si" ;File copy section: Each Application is taken from the source and copied to the folders created ;If $a = True Then FileInstall("E:\JAVA\JRE7_15\jre-7u15-windows-i586.exe", "C:\Windows\Temp\jre-7u15-windows-i586.exe") ;Sleep(5000) ;Registry lookup for Java installation Local $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\", "Java7FamilyVersion") Sleep(5000) If $var = $var2 Then MsgBox(4096, "I see It:", $var) EndIf Else If Not $var2 = $var Then MsgBox(4096, "It Ain't Here:", $var) RunWait(@WindowsDir & "\Temp\jre-7u15-windows-i586.exe /s") Sleep(10000) ;MsgBox(4096, "I see It:", $var) EndIf
everything below this works fine and the install file works fine as well. I placed message boxes in the code so I could track the code and they will be removed later. Any ideas would be great.
Cheers