Java 1.5 Update6
I am getting the below message when I try to install Java:
"Java Update can not be installed on this machine because the directory you have chosen to install is locked...Please close any browser or application that is using the directory you have chosen for installation"
It has "Retry" and "Cancel" as options and when I select Retry it continues and finishes the install as expected. However I need a completely silent install :(
When I get a log file it seems to be a Custom Action called "patchjre.exe" which is causing the problem. I have tried moving it later in the sequence but that throws up other errors.
Has anyone encountered this along the way? It happens with my sources also which is called "jre-1_5_0_06-windows-i586-p.exe". Any idea's would be greatly appreciated!
"Java Update can not be installed on this machine because the directory you have chosen to install is locked...Please close any browser or application that is using the directory you have chosen for installation"
It has "Retry" and "Cancel" as options and when I select Retry it continues and finishes the install as expected. However I need a completely silent install :(
When I get a log file it seems to be a Custom Action called "patchjre.exe" which is causing the problem. I have tried moving it later in the sequence but that throws up other errors.
Has anyone encountered this along the way? It happens with my sources also which is called "jre-1_5_0_06-windows-i586-p.exe". Any idea's would be greatly appreciated!
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
aogilmor
16 years ago
before you run the app manually, use taskmgr and look and see if there's a java.exe or a patchjre.exe running in the background. You may need a CA to forcibly close the process if this is what's causing it.
OTOH it doesn't sound like a fatal error so if you just need a silent installation, something like "jre-1_5_0_06-windows-i586-p.exe /qb" would probably work. Starting with 1.4.x you can unzip these java EXE files to MSI files and apply transforms etc. This is what I would recommend.
OTOH it doesn't sound like a fatal error so if you just need a silent installation, something like "jre-1_5_0_06-windows-i586-p.exe /qb" would probably work. Starting with 1.4.x you can unzip these java EXE files to MSI files and apply transforms etc. This is what I would recommend.
Posted by:
jmcfadyen
16 years ago
Posted by:
oreillyr
16 years ago
Thanks for the replies guys.
I am fairly confident that it is the "patchjre.exe" file that is running and causing the problem. I could take it out of the sequence altogether but I think it is quite essential :) I have tried to extract from it using Winrar but no can do!
I think if I could delay the application's sequence from moving on to this run "patchjre" for a short while then the folders would no longer be in use and the install could continue(when i press "retry"on the error it continues). Does anyone know how this would be achieved? Would I put a custom action in between the two actions in the sequence and maybe put a wait for say 20 secs in it? Any suggestions would be greatly appreciated!
I am fairly confident that it is the "patchjre.exe" file that is running and causing the problem. I could take it out of the sequence altogether but I think it is quite essential :) I have tried to extract from it using Winrar but no can do!
I think if I could delay the application's sequence from moving on to this run "patchjre" for a short while then the folders would no longer be in use and the install could continue(when i press "retry"on the error it continues). Does anyone know how this would be achieved? Would I put a custom action in between the two actions in the sequence and maybe put a wait for say 20 secs in it? Any suggestions would be greatly appreciated!
Posted by:
anonymous_9363
16 years ago
Rather than use a timer delay, it would be much tidier to use a WMI-based VBS to check for the process in a loop and then progress when patchjre.exe drops out of the process list.
Check process is running Ignore the reference to 'VB project', it's pure VBS.
Check process is running Ignore the reference to 'VB project', it's pure VBS.
Posted by:
oreillyr
16 years ago
Thanks VBScab.
There is an exe running called launcher.exe which seems to be still running when patchjre is launched and I think that these two exe's both try to access the same location causing the problem. I need to wait until the launcher.exe stops before the patchjre.exe can start up without getting the error. Not being a VBS expert I am not sure how I would do this from the code in your link, however your name would suggest you are :) Any help would be appreciated, cheers
There is an exe running called launcher.exe which seems to be still running when patchjre is launched and I think that these two exe's both try to access the same location causing the problem. I need to wait until the launcher.exe stops before the patchjre.exe can start up without getting the error. Not being a VBS expert I am not sure how I would do this from the code in your link, however your name would suggest you are :) Any help would be appreciated, cheers
Posted by:
anonymous_9363
16 years ago
I wonder why I didn't get email notification of your response?!? Did you get this sorted? If not:
'// Note that this code will wait F O R E V E R for the process to end. You may want to add code
'// that only waits for 'x' seconds and then exits with an error if process is still running
Option Explicit
Dim objWMIService
Dim colMonitoredProcesses
Dim objLatestProcess
Dim objProcess
Dim colProcess
Dim strProcessName
Dim strComputer
Dim strList
Dim blnProcessRunning
Dim blnProcessTerminated
Dim lngProcessID
Dim intMaxWait
Dim intCounter
Const strProcessToFind = "Notepad.EXE"
strComputer = "." '// Means "Use local computer"
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
blnProcessRunning = FindProcess(strProcessToFind, lngProcessID)
If blnProcessRunning Then
intCounter = 0
blnProcessTerminated = HasProcessTerminated(strProcessToFind)
If Not blnProcessTerminated Then
'// ?
MsgBox "Failed to terminate"
End If
End If
Set objWMIService = Nothing
Function FindProcess(ByVal strProcessToFind, ByRef lngID)
FindProcess = False
Set colProcess = objWMIService.ExecQuery ("SELECT * FROM Win32_Process")
For Each objProcess in colProcess
With objProcess
strProcessName = .Name
If UCase(strProcessName) = UCase(strProcessToFind) Then
lngProcessID = .ProcessID
FindProcess = True
Exit For
End If
End With
Next
Set colProcess = Nothing
End Function
Function HasProcessTerminated(ByVal strProcessToCheck)
'// Monitor process termination
Dim strSQL
Dim strProcessName
HasProcessTerminated = False
strSQL = "SELECT * FROM __instancedeletionevent " & "WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'"
Set colMonitoredProcesses = objWMIService.ExecNotificationQuery(strSQL)
Do While UCase(strProcessName) <> UCase(strProcessToCheck)
Set objLatestProcess = colMonitoredProcesses.NextEvent
strProcessName = objLatestProcess.TargetInstance.Name
Sleep(1)
Loop
HasProcessTerminated = True
End Function
Sub Sleep(ByVal intSleepPeriod)
Dim intStartTime
Dim intEndTime
Dim intCurrentTime
On Error Resume Next
intStartTime = Timer '// Timer returns the number of seconds that have elapsed since midnight.
intEndTime = intStartTime + intSleepPeriod
Do While Timer <= intEndTime
Loop
On Error Goto 0
End Sub
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.