Sccm central site not updating


09-Jun-2016 13:24

I am sure that this modification could be prettier in the code, but this is the easiest. '# Based on a script by 'muaddip' from message boards. Expand Environment Strings("%COMPUTERNAME%") If Not fso. Expand Environment Strings("%temp%") str Temp ISS = str Temp Dir & "\iss" str Un String = " -s -a /s /f1" Set ts In = fso. Write Line Now() & " - " & str Display Name & " - Version: " & str Display Version ts. Reg Read("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\Current Version\Uninstall\" & CLSID & "\Display Name") str Display Version = wsh Shell. You have to remove the uninstall info for the other versions from the registry and reinstall them again to remove them properly.'# Option Explicit Dim wsh Shell, fso, str Log File, ts, str Temp Dir, str Temp ISS, str Un String, ts In, bl Found Dim str Uninst Line, CLSID, search5, search6, search7, str JRE1, str Display Name, str Display Version Dim str Publisher, str Uninstall String, str JREUninstall String, str JREDisplay Name Dim search1, search2, search3, search4, str JREUninstall String NEW, ret, str Uninst CMD Dim ts ISS, str Setupexe, q Val, str Computername q Val = 0 Set wsh Shell = Create Object("WScript. Open Text File(str Temp Dir & "\uninstall.tmp", 1) If Not fso. Create Folder(str Temp ISS) bl Found = False Do While Not ts In. Read Line CLSID = Mid(str Uninst Line, 73, 38) search5 = Instr(str Uninst Line, "JRE 1") search6 = Instr(str Uninst Line, "]") If search5 0 Then str JRE1 = Replace(Mid(str Uninst Line, search5, search6),"]","") End If On Error Resume Next str Display Name = wsh Shell. Write Line Now() & " - Uninstall String sent: " & str Uninst CMD ret = wsh Shell. Write Line Now() & " - Return: " & ret If ret 3010 Then q Val = 1 End If Loop ts In. Open Text File(str Temp Dir & "\uninstall.tmp", 1) If Not fso. Reg Read("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\Current Version\Uninstall\" & CLSID & "\Display Version") str Publisher = wsh Shell. Write Line "Name=Java 2 Runtime Environment, SE v1.4.0_01" ts ISS. You might be able to get around this in the script by changing "Shared File=Yes To All" to "Shared File=No To All" in Create ISSFile but I haven't tested that yet. '*************************************************************************************** 'Java removal script. 'Description: Removes x86 and x64 Java runtimes, except for the specified version. Probably need a different implementation, but I was just running it out of a vbs script. Delete File(str Temp Dir & "\uninstall.tmp") WScript. Run "REGEDIT /E %temp%\HKEY_LOCAL_MACHINE\SOFTWARE\microsoft\windows\currentversion\uninstall", 0, True wsh Shell. Quit(1) End If End Sub Sub Kill Proc() '# kills and if they are running. Dim wsh Shell Set wsh Shell = Create Object("WScript. Looking at the old in c:\logs it never sees either 22 or 23 but is leaving 24 fine. It's strictly an uninstall script but it will preserve a desired version.

sccm central site not updating-64

sex dating in cummings south carolina

\.\root\default: Std Reg Prov")     'Set the logfile path here. Expand Environment Strings("%SYSTEMDRIVE%") & "\logs\"     'Find the Java uninstallers hiding in the uninstall key.

echo.************************************************************************ echo.************************************************************************ wmic product where "name like 'Java(TM) 6%%'" call uninstall wmic product where "name like 'Java 7%%'" call uninstall goto END : END Works both on XP and Winds 7 The trick on Windows 7 is to run it as Administrator (or to run wmic in Administrator Command Prompt -- wherever comes first)In the interest of sharing, below is pasted my Sun Java uninstall all script, originally based on the one above by muaddip. Write Line Now() & " - Java Runtime(s) uninstallation" ts. Quit(1) End If End Sub Sub Kill Proc() '# kills and if they are running. Dim wsh Shell Set wsh Shell = Create Object("WScript. Reg Read("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\Uninstall\" & str JRE1 & "\Display Name") On Error Goto 0 'Search for presence of Java and Sun in Display Name and Publisher search1 = Instr(1, str Display Name, "Java", 1) search2 = Instr(1, str Publisher, "Sun", 1) search3 = Instr(1, str Display Name, "J2SE", 1) search4 = Instr(1, str Uninstall String, "setup.exe", 1) search7 = In Str(1, str Display Name, "Development", 1) In Str(1, str Display Name, "Java DB", 1) 'Make sure it is not the current version search Cur Ver = In Str(1, str Display Name, str Current Version, 1) If search Cur Ver "" Then bl Found = True '# JRE 1 found str JREUninstall String NEW = Replace(str JREUninstall String," -f"," -s -a /s /f") ts. Write Line Now() & " - Uninstall String sent: " & str JREUninstall String NEW ret = wsh Shell. Write Line Now() & " - Return: " & ret If ret 0 Then '# Old Install Shield setup found Set ts ISS = fso. But if the msiexec process fails to uninstall one of the versions because the process is still running, the msiexec return code will be logged in the log. I agree completely with your critique, however I believe that the effort you put into error-trapping has to be proportionate to the chances of an error occurring undetected. Simple solutions always appeal to me :o) I only found the technique via the MS forums though (searched for: "bugassert" site:on google) but I like the idea. Write Line String(120, "_") & vb Crlf '# Generate Registry extracts from 'Uninstall' keys. Close Dim I If Cur Ver Found AND str Array Count 0 Then ts. Hi Jean, Yes you can just change that line to determine the exit code for if the script did not find any Sun JRE versions to uninstall. Write Line Now() & " - Java Runtime(s) uninstallation started..." ts. Close str Setupexe = Left(str Uninstall String, search4 9) str Uninst CMD = str Setupexe & str Un String & Chr(34) & str Temp ISS & "\" & CLSID & ".iss" & Chr(34) End If redim Preserve array JREDisplay Name(str Array Count) redim Preserve array JREUninstall String(str Array Count) array JREDisplay Name(str Array Count) = " - Found Old JRE: " & str Display Name & " - Version: " & str Display Version & ", Uninstalling..." array JREUninstall String(str Array Count) = str Uninst CMD str Array Count = str Array Count 1 End If Loop ts In.