reqopaplus.blogg.se

Java uninstall tool for windows 10
Java uninstall tool for windows 10







java uninstall tool for windows 10

'The following SWbem setup allows a script running in a x86 context, such as under the SCCM client, on a 圆4 system Set objWSHShell = CreateObject("WScript.Shell") '-Functions-įunction RemoveJava(strRegistryPath, aryVersions, strLogFilePath, objProcessor)ĭim objWSHShell, objRegistry, objWbemContext, objSWbemLocator, objSWbemServicesĭim strUninstallKey, strDisplayName, strUninstallString, strVersion RemoveJava "Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\", aryVersionsx86On圆4, strLogFilePath, objProcessor If (objProcessor.AddressWidth = "64") Then 'This call will remove x86 versions on a 圆4 system. RemoveJava "Software\Microsoft\Windows\CurrentVersion\Uninstall\", aryVersions, strLogFilePath, objProcessor 'This call will remove 圆4 versions on a 圆4 system and x86 versions on a x86 system. WScript.Echo vbCrLf & "Java uninstall script finished at " & Now() WScript.Echo "Finished problematic process check." WScript.Echo "Error Description: " & Err.Description WScript.Echo "Error Number: " & Err.Number WScript.Echo "Could not kill process " & objProcess.Name & "! Aborting Script!" WScript.Echo "Process " & objProcess.Name & " already closed." WScript.Echo "Killed process " & objProcess.Name & "." WScript.Echo "Found process " & objProcess.Name & "." 'Cycle through found problematic processes and kill them. 'Set this to look for errors that aren't fatal when killing processes. WScript.Echo "Checking for problematic processes." Set colProcesses = objWMIService.ExecQuery("Select Name from Win32_Process Where Name = 'jqs.exe' OR Name = 'jusched.exe' OR Name = 'jucheck.exe' OR Name = 'jp2launcher.exe' OR Name = 'java.exe' OR Name = 'javaws.exe' OR Name = 'javaw.exe'", "WQL", 48) 'Kill processes that might prevent installs or uninstalls. Set objProcessor = GetObject("winmgmts:\\.\root\cimv2:Win32_Processor='cpu0'") Check objProcessor.AddressWidth = "32" or "64" objProcessor.AddressWidth will give us bitness. Start /wait "" REGEDIT /E c:\temp\registry.tmp HKEY_LOCAL_MACHINE\SOFTWARE\microsoft\windows\currentversion\uninstall









Java uninstall tool for windows 10