Added separated net framework pack (thanks to Ganesha and Dimpel) for XP

Remove all versions of Java (thanks to LabDeploy) and install the latest version (from sereby paket)
Predefined install variables for versions later than 2.0.1, variables are working in this version, but the timer will be disabled (timer-bug).
Added extracted installation mode, specially for wan connections
Added wan recognition
This commit is contained in:
Peter Singer 2012-11-06 09:33:09 +01:00
parent afaf64f3f0
commit 22c983b711
9 changed files with 891 additions and 11 deletions

View File

@ -0,0 +1,392 @@
'***************************************************************************************
'Java removal script.
'Version: 3.0
'Description: Removes specified Java versions based on command line parameters.
' !!!!!!USE AT YOUR OWN RISK!!!!!!!
'2011.03.09 - 2.0 - First version. Assumes %SYSTEMDRIVE%\Logs exists.
'2011.03.23 - 2.1 - Fixes issue running in 32bit SCCM under 64bit Windows.
'2011.03.30 - 2.2 - Adds array of versions to keep.
'2011.04.24 - 3.0 - Added command line parameters. Still doesn't make the log directory!
'
'http://www.itninja.com/question/silent-uninstall-java-all-versions
'***************************************************************************************
'-----------------------------Begin Main Script--------------------------------
Option Explicit
'If help is specified on the command line, show it and quit.
If WScript.Arguments.Named.Count < 1 Or WScript.Arguments.Named.Exists("help") Or WScript.Arguments.Named.Exists("?") Then
PrintHelp()
WScript.Quit(0)
End If
Dim aryVersions, aryVersionsx86Onx64
Dim bolKeepJava
Dim colNamedArguments, colProcesses
Dim objWMIService, objProcessor, objProcess
Dim strArgument, strLogFilePath
'Set default command line parameters.
'The script defaults to removing all versions of Java without leaving uninstall logs.
bolKeepJava = 1
strLogFilePath = ""
aryVersions = Array()
aryVersionsx86Onx64 = Array()
'Start script logging.
WScript.Echo "**********************************"
WScript.Echo "Java uninstall script started at " & Now()
'Parse command line parameters.
If WScript.Arguments.Named.Count > 0 Then
Set colNamedArguments = WScript.Arguments.Named
For Each strArgument in colNamedArguments
Select Case LCase(strArgument)
Case "keeponly"
Case "removeonly"
bolKeepJava = 0
Case "logfilepath"
strLogFilePath = colNamedArguments.Item(strArgument)
Case "versions"
aryVersions = Split(colNamedArguments.Item(strArgument), ";", -1, 1)
Case "versionsx86onx64"
aryVersionsx86Onx64 = Split(colNamedArguments.Item(strArgument), ";", -1, 1)
Case Else
WScript.Echo vbCrLf & "Unknown switch: " & strArgument & "."
WScript.Echo vbCrLf & "Java uninstall script finished at " & Now()
WScript.Echo "**********************************" & vbCrLf
PrintHelp()
WScript.Quit(2)
End Select
Next
End If
'Output the parameters the script was run with.
WScript.Echo vbCrLf & "----------------------------------"
WScript.Echo "Script parameters:"
If bolKeepJava Then
WScript.Echo "Specified Java versions found will be kept. Other versions will be removed."
Else
WScript.Echo "Specified Java versions found will be removed. Other versions will be kept."
End If
'This check is important. It will default the versions array if no versions were specified. Without this the whole thing falls apart.
If (Ubound(aryVersions) < 0 ) Then
aryVersions = Array("FooBar")
WScript.Echo "No native Java versions specified on the command line."
Else
WScript.Echo "Native Java versions specified on the command line."
End If
'If no non-native versions are specified set the non-native array to the native array.
If (Ubound(aryVersionsx86Onx64) < 0) Then
aryVersionsx86Onx64 = aryVersions
WScript.Echo "No x86 Java versions for x64 systems specified on the command line." & vbCrLf & "Using specified native verions for x86 also."
Else
WScript.Echo "x86 Java versions for x64 systems specified on the command line."
End If
If strLogFilePath = "" Or IsNull(strLogFilePath) Then
WScript.Echo "Uninstall logfile path is empty. Uninstall logs will not be created."
Else
'If the log file path does not end in a \ put one on there!
If (StrComp(Right(strLogFilePath,1), "\") <> 0) Then
strLogFilePath = strLogFilePath & "\"
End If
WScript.Echo "Uninstall log file path: " & strLogFilePath & "."
End If
WScript.Echo "----------------------------------"
'Get a WMI Service object.
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate, (Debug)}\\.\root\cimv2")
'Get processor object. objProcessor.AddressWidth will give us bitness. Check objProcessor.AddressWidth = "32" or "64"
Set objProcessor = GetObject("winmgmts:\\.\root\cimv2:Win32_Processor='cpu0'")
'Kill processes that might prevent installs or uninstalls.
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)
WScript.Echo vbCrLf & "----------------------------------"
WScript.Echo "Checking for problematic processes."
'Set this to look for errors that aren't fatal when killing processes.
On Error Resume Next
'Cycle through found problematic processes and kill them.
For Each objProcess in colProcesses
WScript.Echo "Found process " & objProcess.Name & "."
objProcess.Terminate()
Select Case Err.Number
Case 0
WScript.Echo "Killed process " & objProcess.Name & "."
Err.Clear
Case -2147217406
WScript.Echo "Process " & objProcess.Name & " already closed."
Err.Clear
Case Else
WScript.Echo "Could not kill process " & objProcess.Name & "! Aborting Script!"
WScript.Echo "Error Number: " & Err.Number
WScript.Echo "Error Description: " & Err.Description
WScript.Echo "Finished problematic process check."
WScript.Echo "----------------------------------"
WScript.Echo vbCrLf & "Java uninstall script finished at " & Now()
WScript.Echo "**********************************" & vbCrLf
WScript.Quit(1)
End Select
Next
'Resume normal error handling.
On Error Goto 0
WScript.Echo "Finished problematic process check."
WScript.Echo "----------------------------------"
'This call will remove x64 versions on a x64 system and x86 versions on a x86 system.
RemoveJava "Software\Microsoft\Windows\CurrentVersion\Uninstall\", aryVersions, strLogFilePath, objProcessor
'This call will remove x86 versions on a x64 system.
If (objProcessor.AddressWidth = "64") Then
RemoveJava "Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\", aryVersionsx86Onx64, strLogFilePath, objProcessor
End If
WScript.Echo vbCrLf & "Java uninstall script finished at " & Now()
WScript.Echo "**********************************" & vbCrLf
'-------------------------------End Main Script--------------------------------
'---------------------------------Functions------------------------------------
Function RemoveJava(strRegistryPath, aryVersions, strLogFilePath, objProcessor)
Dim objWSHShell, objRegistry, objWbemContext, objSWbemLocator, objSWbemServices
Dim aryUninstallKeys
Dim strUninstallKey, strDisplayName, strUninstallString, strVersion
Dim intUninstallReturnCode
Set objWSHShell = CreateObject("WScript.Shell")
'The following SWbem setup allows a script running in a x86 context, such as under the SCCM client, on a x64 system
'to access the full x64 registry. Without this the actual registry paths will be transparently redirected to the
'Wow6432Node branch for every registry call to HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall.
'Essentially this transparent redirection would hide 64bit Java runtimes from a script running in 32bit mode on a 64bit OS.
'Provides the bitness context parameters for registry calls.
Set objWbemContext = CreateObject("WbemScripting.SWbemNamedValueSet")
objWbemContext.Add "__ProviderArchitecture", objProcessor.AddressWidth
objWbemContext.Add "__RequiredArchitecture", true
'Create SWbemLocator to connect to WMI
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
'Actually connect to the WMI service using the SWbemLocator and the SWbemContext parameters.
Set objSWbemServices = objSWbemLocator.ConnectServer(".","root\default","","",,,,objWbemContext)
'Get the Standard Registry Provider from WMI... finally.
Set objRegistry = objSWbemServices.Get("StdRegProv")
'Find the Java uninstallers hiding in the uninstall key. &H80000002 = HKEY_LOCAL_MACHINE for this function call.
objRegistry.EnumKey &H80000002, strRegistryPath, aryUninstallKeys
'Enable VBS' poor excuse for error handling...
On Error Resume Next
For Each strUninstallKey In aryUninstallKeys
'These must be reset in case the GetStringValue fails to return a value. This way we don't keep values for other pieces of software.
strDisplayName = ""
strUninstallString = ""
intUninstallReturnCode = ""
'DisplayName should always be a REG_SZ
objRegistry.GetStringValue &H80000002, strRegistryPath & strUninstallKey, "DisplayName", strDisplayName
'Just in case GetStringValue doesn't retrieve what we want.
If Err.Number <> 0 Then
Wscript.Echo vbCrLf & "----------------------------------"
WScript.Echo "Could not retrieve DisplayName at " & strRegistryPath & strUninstallKey & "!"
WScript.Echo "Error Number: " & Err.Number
WScript.Echo "Error Description: " & Err.Description
Wscript.Echo "----------------------------------"
strDisplayName = ""
Err.Clear
End If
'In English: If the DisplayName contains either Java OR the DisplayName contains J2SE Runtime Environment
'AND if the DisplayName does not contain Development AND if the DisplayName does not contain JavaDB
'AND if the DisplayName does not contain Web Start
'AND if the DisplayName does not contain SAS
'AND if the DisplayName does not contain Java Auto Update then do the if block.
'Fun, eh?
'You could remove the Web Start line to get rid of JWS but the uninstall string If block would have to account for that. It currently doesn't.
If ((Instr(1, strDisplayName, "Java", 1) OR (Instr(1, strDisplayName, "J2SE Runtime Environment", 1))) _
AND ((Instr(1, strDisplayName, "Development", 1) + Instr(1, strDisplayName, "JavaDB", 1)) < 1) _
AND (Instr(1, strDisplayName, "Web Start", 1) < 1) _
AND (Instr(1, strDisplayName, "SAS", 1) < 1) _
AND (Instr(1, strDisplayName, "Java Auto Update", 1) < 1)) Then
Wscript.Echo vbCrLf & "----------------------------------"
WScript.Echo "Found version: " & strDisplayName
WScript.Echo "Found at: HKEY_LOCAL_MACHINE\" & strRegistryPath & strUninstallKey
'UninstallString might be a REG_EXPAND_SZ but GetStringValue should retrieve what we want.
objRegistry.GetStringValue &H80000002, strRegistryPath & strUninstallKey, "UninstallString", strUninstallString
'Just in case GetStringValue doesn't retrieve what we want.
If Err.Number <> 0 Then
Wscript.Echo vbCrLf & "----------------------------------"
WScript.Echo "Could not retrieve uninstall information for " & strDisplayName & "!"
WScript.Echo "Error Number: " & Err.Number
WScript.Echo "Error Description: " & Err.Description
Wscript.Echo "----------------------------------"
strUninstallString = ""
Err.Clear
End If
'Slightly convoluted logic that determines if we're keeping or removing specific versions.
For Each strVersion In aryVersions
If (bolKeepJava) Then
If (Instr(1, strDisplayName, strVersion, 1) > 0) Then
strUninstallString = ""
End If
Else
If (Instr(1, strDisplayName, strVersion, 1) < 1) Then
strUninstallString = ""
End If
End If
Next
If (strUninstallString <> "") Then
'Look for very old JRE 1.1, 1.2.x, or 1.3.0 to 1.3.0_04 and 1.3.1 to 1.3.1_04 InstallShield installs.
If (Instr(1, strUninstallKey, "JRE 1", 1)) Then
strUninstallString = Replace(strUninstallString, "-f", "-a -x -y -f")
'Look for 1.3.0_05 and 1.3.1_05 to 1.3.1_20 InstallShield based installs.
ElseIf (Instr(1, strUninstallString, "-uninst", 1)) Then
strUninstallString = ""
WScript.Echo "Java versions 1.3.0_05 and 1.3.1_05 through 1.3.1_20 cannot be silently uninstalled."
'Look for a 1.4.0 to 1.4.1_07 InstallShield installation.
ElseIf (Instr(1, strUninstallString, "Anytext", 1)) Then
'Create ISS script for this install and fix the uninstall string.
If (CreateISSFile(strUninstallKey, objWSHShell.ExpandEnvironmentStrings("%TEMP%"))) Then
strUninstallString = Replace(strUninstallString, "Anytext", "/s /SMS /w /f1""" & objWSHShell.ExpandEnvironmentStrings("%TEMP%") _
& "\" & strUninstallKey & ".iss""")
'Check and add the logfile to the uninstaller string.
If (strLogFilePath <> "") Then
strUninstallString = strUninstallString & " /f2""" & strLogFilePath & strDisplayName & "_Uninstall.txt"""
End If
Else
strUninstallString = ""
End If
'Look for 1.4.2 and up MSI based InstallShield installs.
ElseIf (Instr(1, strUninstallString, "msiexec.exe", 1)) Then
'Create MSIEXEC uninstall string.
strUninstallString = "MSIEXEC.EXE /X " & strUninstallKey & " /qn /norestart"
'Check and add the logfile to the uninstaller string.
If (strLogFilePath <> "") Then
strUninstallString = strUninstallString & " /l*v """ & strLogFilePath & strDisplayName & "_Uninstall.txt"""
End If
Else
strUninstallString = ""
End If
Else
strUninstallString = ""
End If
WScript.Echo "Uninstall string: " & strUninstallString
If (strUninstallString = "") Then
WScript.Echo strDisplayName & " was not uninstalled."
Else
'Run the uninstaller.
intUninstallReturnCode = objWSHShell.Run(strUninstallString, 0, true)
WScript.Echo "Uninstall return code was: " & intUninstallReturnCode & "."
End If
WScript.Echo "----------------------------------"
End If
Next
'Resume normal quit on error behavior.
On Error GoTo 0
End Function
Function CreateISSFile(strUninstallKey, strTempPath)
On Error Resume Next
Dim objFileSystem, objUninstallScript
Set objFileSystem = CreateObject("Scripting.FileSystemObject")
'Create InstallShield ISS script file for the uninstallation.
Set objUninstallScript = objFileSystem.OpenTextFile(strTempPath & "\" & strUninstallKey & ".iss", 2, True)
If (Err.Number <> 0) Then
WScript.Echo "Could not create uninstall file at " & strTempPath & "\" & strUninstallKey & ".iss!"
WScript.Echo "Error Number: " & Err.Number
WScript.Echo "Error Description: " & Err.Description
Err.Clear
CreateISSFile = 0
End If
'One ugly write statement to cut down on the ammount of error checking that has to be done.
'That SharedFile=YesToAll creates problems with multiple versions of 1.4.0 to 1.4.1_07 installed.
objUninstallScript.Write "[InstallShield Silent]" & vbCrLf & "Version=v6.00.000" & vbCrLf & "File=Response File" & vbCrLf & "[File Transfer]" & _
vbCrLf & "OverwrittenReadOnly=NoToAll" & vbCrLf & "[" & strUninstallKey & "-DlgOrder]" & vbCrLf & "Dlg0=" & strUninstallKey & "-SprintfBox-0" & _
vbCrLf & "Count=2" & vbCrLf & "Dlg1=" & strUninstallKey & "-File Transfer" & vbCrLf & "[" & strUninstallKey & "-SprintfBox-0]" & vbCrLf & "Result=1" & _
vbCrLf & "[Application]" & vbCrLf & "Name=Java 2 Runtime Environment, SE v1.4.0" & vbCrLf & "Version=1.4.0" & vbCrLf & "Company=JavaSoft" & _
vbCrLf & "Lang=0009" & vbCrLf & "[" & strUninstallKey & "-File Transfer]" & vbCrLf & "SharedFile=NoToAll"
If (Err.Number <> 0) Then
WScript.Echo "Could not create uninstall file at " & strTempPath & "\" & strUninstallKey & ".iss!"
WScript.Echo "Error Number: " & Err.Number
WScript.Echo "Error Description: " & Err.Description
Err.Clear
CreateISSFile = 0
End If
objUninstallScript.Close
If (Err.Number <> 0) Then
WScript.Echo "Could not create uninstall file at " & strTempPath & "\" & strUninstallKey & ".iss!"
WScript.Echo "Error Number: " & Err.Number
WScript.Echo "Error Description: " & Err.Description
Err.Clear
CreateISSFile = 0
End If
CreateISSFile = 1
End Function
Function PrintHelp()
'Just prints out the help when run with /help /? or no arguments.
WScript.Echo vbCrLf & "Java Runtime Environment Removal Script v3.0" & vbCrLf
WScript.Echo "Removes Java runtimes based on command line parameters." & vbCrLf & "Default parameters removes all Java versions without creating logs."
WScript.Echo "Does not uninstall Java versions 1.3.0_05 and 1.3.1_05 through 1.3.1_20." & vbCrLf & "They do not uninstall silently." & vbCrLf
WScript.Echo "Command line switches:" & vbCrLf
WScript.Echo "/keeponly" & vbTab & vbTab & "Script keeps only versions specified." & vbCrLf & vbTab & vbTab & vbTab & "If no versions are specified no versions are kept." & vbCrLf
WScript.Echo "/removeonly" & vbTab & vbTab & "Script removes only versions specified." & vbCrLf & vbTab & vbTab & vbTab & "If no versions are specified no versions are removed." & vbCrLf
WScript.Echo "/versions:" & vbTab & vbTab & "Specifies verions to act on." & vbCrLf & vbTab & vbTab & vbTab & "Versions are seperated by semicolons." & vbCrLf & vbTab & vbTab & vbTab & _
"By default specified versions are kept." & vbCrLf & vbTab & vbTab & vbTab & "MUST MATCH THE DISPLAY NAME IN ADD/REMOVE PROGRAMS" & vbCrLf
WScript.Echo "/versionsx86onx64:" & vbTab & "Specifies x86 runtime versions to keep on a x64 system." & vbCrLf & vbTab & vbTab & vbTab & _
"Versions are seperated by semicolon." & vbCrLf & vbTab & vbTab & vbTab & _
"If no x86 versions are specified script uses versions" & vbCrLf & vbTab & vbTab & vbTab & "specified by /versions for both x64 and x86 runtimes." _
& vbCrLf & vbTab & vbTab & vbTab & "MUST MATCH THE DISPLAY NAME IN ADD/REMOVE PROGRAMS" & vbCrLf
Wscript.Echo "/logfilepath:" & vbTab & vbTab & "Sets path for uninstall log file from Java runtimes." & vbCrLf & vbTab & vbTab & vbTab & _
"If path does not exist uninstallers will fail." & vbCrLf
WScript.Echo "Examples:" & vbCrLf
WScript.Echo "cscript /nologo JavaUninstallScript.vbs /keeponly /versions:""Java(TM) 6 Update 24;J2SE Runtime Environment 5.0 Update 16"" /logfilepath:""C:\Temp"""
WScript.Echo "Removes all Java Runtimes found except Java 6 Update 24 and J2SE 5 Update 16 and places the uninstall logs in C:\Temp." & vbCrLf
WScript.Echo "cscript /nologo JavaUninstallScript.vbs /keeponly /versions:""Java(TM) 6 Update 24"" /versionsx86onx64:""J2SE Runtime Environment 5.0 Update 16"" /logfilepath:""C:\Temp"""
WScript.Echo "Removes all Java Runtimes found except x64 Java 6 Update 24 and x86 J2SE 5 Update 16 on a x64 system and places the uninstall logs in C:\Temp." & vbCrLf
WScript.Echo "cscript /nologo JavaUninstallScript.vbs /keeponly"
WScript.Echo "Removes all Java Runtimes without creating logs." & vbCrLf
WScript.Echo "cscript /nologo JavaUninstallScript.vbs /removeonly"
WScript.Echo "Keeps all Java Runtimes. Only useful for making a list of installed runtimes." & vbCrLf
End Function

View File

@ -0,0 +1,18 @@
<settings maximized="1">
<timer value="40" enabled="1" />
<set component="net1.1" checked="1" />
<set component="net2.0" checked="1" />
<set component="net3.0" checked="1" />
<set component="net3.5" checked="1" />
<set component="net4.0" checked="0" />
<set component="net4.5" checked="1" />
<set component="msjsharp" checked="1" />
<set component="silver" checked="1" />
<set component="jre7" checked="1" />
<set component="AdobeShock" checked="1" />
<set component="basicruntimes" checked="1" />
<set component="msdx9" checked="1" />
<set component="msdxm" checked="1" />
<set component="msvc" checked="1" />
<set component="AdobeFlash" checked="1" />
</settings>

View File

@ -25,9 +25,60 @@ DefVar $INST_architecture$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
DefVar $MSVersion$
Set $MSVersion$ = GetMsVersionInfo
DefVar $xp_wsus_bugfix$
Set $xp_wsus_bugfix$ = GetProductProperty("xp_wsus_bugfix", "1")
DefVar $java_reinstall$
Set $java_reinstall$ = GetProductProperty("java_reinstall", "1")
DefVar $extract_install$
Set $extract_install$ = GetProductProperty("extract_install", "0")
DefVar $extract_use$
Set $extract_use$ = GetProductProperty("extract_use", "0")
DefVar $connection_set_max_latency$
Set $connection_set_max_latency$ = GetProductProperty("connection_set_max_latency", "30")
DefVar $connection_wan$
DefStringList $Output$
DefVar $timer_value$
Set $timer_value$ = GetProductProperty("timer_value", "40")
DefVar $timer_enabled$
Set $timer_enabled$ = GetProductProperty("timer_enabled", "1")
DefVar $inst_net1.1$
Set $inst_net1.1$ = GetProductProperty("inst_net1.1", "1")
DefVar $inst_net2.0$
Set $inst_net2.0$ = GetProductProperty("inst_net2.0", "1")
DefVar $inst_net3.0$
Set $inst_net3.0$ = GetProductProperty("inst_net3.0", "1")
DefVar $inst_net3.5$
Set $inst_net3.5$ = GetProductProperty("inst_net3.5", "1")
DefVar $inst_net4.0$
Set $inst_net4.0$ = GetProductProperty("inst_net4.0", "0")
DefVar $inst_net4.5$
Set $inst_net4.5$ = GetProductProperty("inst_net4.5", "1")
DefVar $inst_msjsharp$
Set $inst_msjsharp$ = GetProductProperty("inst_msjsharp", "1")
DefVar $inst_silver$
Set $inst_silver$ = GetProductProperty("inst_silver", "1")
DefVar $inst_jre7$
Set $inst_jre7$ = GetProductProperty("inst_jre7", "1")
DefVar $inst_AdobeShock$
Set $inst_AdobeShock$ = GetProductProperty("inst_AdobeShock", "1")
DefVar $inst_basicruntimes$
Set $inst_basicruntimes$ = GetProductProperty("inst_basicruntimes", "1")
DefVar $inst_msdx9$
Set $inst_msdx9$ = GetProductProperty("inst_msdx9", "1")
DefVar $inst_msdxm$
Set $inst_msdxm$ = GetProductProperty("inst_msdxm", "1")
DefVar $inst_msvc$
Set $inst_msvc$ = GetProductProperty("inst_msvc", "1")
DefVar $inst_AdobeFlash$
Set $inst_AdobeFlash$ = GetProductProperty("inst_AdobeFlash", "1")
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables:
; from builder-product.cfg : all variables definded by attribute WINST[index]
@ -38,6 +89,7 @@ Set $LogDir$ = "%SystemDrive%\tmp"
;
@@BUILDER_VARIABLES@@
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
@ -75,9 +127,59 @@ else
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Installing " + $ProductId$ + " 32 Bit..."
comment "Start setup program"
Winbatch_install_32
Sub_check_exitcode
if (( $MSVersion$ = "5.1" ) and ($xp_wsus_bugfix$ = "1"))
if (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F}] DisplayName") = "")
comment "DotNet 2.0 SP2 not found in registry, starting install dotNetFX3.5"
Message "Installing " + "dotNetFX 2 - 3.5" + " 32 Bit..."
Winbatch_install_dotNet_XP_2-3.5_32
sub_check_exitcode
endif
if (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3C3901C5-3455-3E0A-A214-0B093A5070A6}] DisplayName") = "")
comment "DotNet 4.0 not found in registry, starting install dotNetFX4 install"
Message "Installing " + "dotNetFX 4" + " 32 Bit..."
Winbatch_install_dotNet_XP_4_32
sub_check_exitcode
endif
endif
comment "Reinstall Java"
if ($java_reinstall$ = "1")
Message "Uninstalling " + "Java" + " 32 Bit..."
Dosbatch_java_reinstall
endif
comment "Install the extracted version of the sereby packet on opsiserver"
if (($extract_install$ = "1") and not (FileExists("%ScriptPath%\X86\sereby\extracted\WinPKG.exe")))
Message "Installing " + $ProductId$ + " on depotserver..."
Dosbatch_extract_install
endif
comment "Get connection latency between server and client"
if ($extract_use$ = "auto")
Message "Get connection latency..."
Dosbatch_get_connection_latency
Set $Output$ = getOutStreamFromSection('Dosbatch_get_connection_latency')
Set $connection_wan$ = takeFirstStringContaining($Output$, "opsi wan mode : ")
Set $connection_wan$ = TakeString(1, SplitString($connection_wan$, " : "))
endif
comment "Build sereby configuration"
Message "Build sereby configuration"
Dosbatch_build_config
comment "Choose version to install"
if (($extract_use$ = "1") or (($extract_use$ = "auto") and ($connection_wan$ = "1")))
Message "Installing extracted " + $ProductId$ + " 32 Bit..."
comment "Start extracted setup program"
Dosbatch_install_extracted_32
Sub_check_exitcode
else
Message "Installing " + $ProductId$ + " 32 Bit..."
comment "Start setup program"
Winbatch_install_32
Sub_check_exitcode
endif
comment "Copy files"
Files_install_32 /32Bit
comment "Patch Registry"
@ -88,9 +190,59 @@ else
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Installing " + $ProductId$ + " 64 Bit..."
comment "Start setup program"
Winbatch_install_64
Sub_check_exitcode
if (( $MSVersion$ = "5.1" ) and ($xp_wsus_bugfix$ = "1"))
if (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F}] DisplayName") = "")
comment "DotNet 2.0 SP2 not found in registry, starting install dotNetFX3.5"
Message "Installing " + "dotNetFX 2 - 3.5" + " 32 Bit..."
Winbatch_install_dotNet_XP_2-3.5_32
sub_check_exitcode
endif
if (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3C3901C5-3455-3E0A-A214-0B093A5070A6}] DisplayName") = "")
comment "DotNet 4.0 not found in registry, starting install dotNetFX4 install"
Message "Installing " + "dotNetFX 4" + " 32 Bit..."
Winbatch_install_dotNet_XP_4_32
sub_check_exitcode
endif
endif
comment "Reinstall Java"
if ($java_reinstall$ = "1")
Message "Uninstalling " + "Java" + " 32 + 64 Bit..."
Dosbatch_java_reinstall
endif
comment "Install the extracted version of the sereby packet on opsiserver"
if (($extract_install$ = "1") and not (FileExists("%ScriptPath%\X86\sereby\extracted\WinPKG.exe")))
Message "Installing extracted " + $ProductId$ + " on depotserver..."
Dosbatch_extract_install
endif
comment "Get connection latency between server and client"
if ($extract_use$ = "auto")
Message "Get connection latency..."
Dosbatch_get_connection_latency
Set $Output$ = getOutStreamFromSection('Dosbatch_get_connection_latency')
Set $connection_wan$ = takeFirstStringContaining($Output$, "opsi wan mode : ")
Set $connection_wan$ = TakeString(1, SplitString($connection_wan$, " : "))
endif
comment "Build sereby configuration"
Message "Build sereby configuration"
Dosbatch_build_config winst /64Bit
comment "Choose version to install"
if (($extract_use$ = "1") or (($extract_use$ = "auto") and ($connection_wan$ = "1")))
Message "Installing extracted " + $ProductId$ + " 64 Bit..."
comment "Start extracted setup program"
Dosbatch_install_extracted_32
Sub_check_exitcode
else
Message "Installing " + $ProductId$ + " 64 Bit..."
comment "Start setup program"
Winbatch_install_64
Sub_check_exitcode
endif
comment "Copy files"
Files_install_64 /64Bit
comment "Patch Registry"
@ -104,6 +256,91 @@ else
endif
[Winbatch_install_dotNet_XP_2-3.5_32]
"$Install32_XP1_Exe$"
[Winbatch_install_dotNet_XP_4_32]
"$Install32_XP2_Exe$" /ain
[Dosbatch_java_reinstall]
cscript /nologo "%ScriptPath%\X86\java\JavaUninstallScript.vbs" /keeponly
[Dosbatch_extract_install]
@echo off &setlocal
"$Install32Exe$" -gm0 -nr
echo Ident opsi Server
echo .
for /f "tokens=2 delims=\" %%a in ('net use p:') do set "opsiservername=%%a"
echo opsi Server: %opsiservername%
@echo off
net use x: \\%opsiservername%\opt_pcbin
net use /delete p:
net use p: \\%opsiservername%\opt_pcbin\install
xcopy "%SystemDrive%\AiO-Files\*.*" "%ScriptPath%\X86\sereby\extracted\" /S /E /D /Y
rem rd "%SystemDrive%\AiO-Files" /S /Q
net use /delete p:
net use p: \\%opsiservername%\opsi_depot
net use /delete x:
[Dosbatch_get_connection_latency]
@echo off
setlocal enabledelayedexpansion
echo Ident opsi Server
echo .
for /f "tokens=2 delims=\" %%a in ('net use p:') do set "opsiservername=%%a"
echo opsi Server : %opsiservername%
for /f "tokens=4 delims='='" %%a in ('ping %opsiservername% -n 10') do set "opsiserverping=%%a"
set Latenzms=!opsiserverping:~1,10!
echo Latenz in ms : %Latenzms%
for /f "tokens=1 delims=m" %%a in ('@echo %Latenzms%') do set "Latenz=%%a"
echo Latenz : %Latenz%
if %Latenz% GTR $connection_set_max_latency$ (set wan=1) else (set wan=0)
@echo opsi wan mode : %wan%
[Dosbatch_build_config]
copy "%ScriptPath%\X86\winpkg\WinPKG.xml" "%System%"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/timer[@value=40]/@value" -v $timer_value$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/timer[@enabled=1]/@enabled" -v $timer_enabled$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='net1.1']/@checked" -v $inst_net1.1$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='net2.0']/@checked" -v $inst_net2.0$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='net3.0']/@checked" -v $inst_net3.0$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='net3.5']/@checked" -v $inst_net3.5$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='net4.0']/@checked" -v $inst_net4.0$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='net4.5']/@checked" -v $inst_net4.5$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='msjsharp']/@checked" -v $inst_msjsharp$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='silver']/@checked" -v $inst_silver$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='jre7']/@checked" -v $inst_jre7$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='AdobeShock']/@checked" -v $inst_AdobeShock$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='basicruntimes']/@checked" -v $inst_basicruntimes$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='msdx9']/@checked" -v $inst_msdx9$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='msdxm']/@checked" -v $inst_msdxm$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='msvc']/@checked" -v $inst_msvc$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
copy "%System%\WinPKG.xml" "%System%\WinPKG.xml.old"
xml ed -O -u "/settings/set[@component='AdobeFlash']/@checked" -v $inst_AdobeFlash$ "%System%\WinPKG.xml.old" > "%System%\WinPKG.xml"
[Dosbatch_install_extracted_32]
@echo off
p:
cd "%ScriptPath%\X86\sereby\extracted"
"$Install_extracted_32Exe$"
[Winbatch_install_32]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
@ -116,6 +353,12 @@ endif
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
[Dosbatch_install_extracted_64]
@echo off
p:
cd "%ScriptPath%\X86\sereby\extracted"
"$Install_extracted_64Exe$"
[Winbatch_install_64]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer

View File

@ -0,0 +1 @@
ea29c5eaa35a33544010630226f62e2cf44d7352 /home/opsiproducts/.opsi-dist-cache/sereby.aio-2.0.1/X86/net3.5/NET_FRAMEWORK3.5.CAB

View File

@ -30,3 +30,206 @@ description: which architecture (32/64 bit) has to be installed
values: ["32 only", "64 only", "both", "system specific"]
default: ["system specific"]
[ProductDependency]
action: setup
requiredProduct: sourceforge.xmlstarlet
requiredStatus: installed
requirementType: before
[ProductProperty]
type: unicode
name: xp_wsus_bugfix
multivalue: False
editable: False
description: Correct a XP WSUS bug. If the value is set to false, the Net Framwork 3.5 SP1 (KB951847) installation often loops.
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: java_reinstall
multivalue: False
editable: False
description: Remove all versions of Java and install the latest version (from sereby packet)
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: extract_install
multivalue: False
editable: False
description: Install the extracted version of the sereby packet on opsiserver
values: ["0", "1"]
default: ["0"]
[ProductProperty]
type: unicode
name: extract_use
multivalue: False
editable: False
description: Use the extracted version of the sereby packet on opsiserver. If set to auto extracted version will be used for wan connections.
values: ["0", "1", "auto"]
default: ["0"]
[ProductProperty]
type: unicode
name: connection_set_max_latency
multivalue: False
editable: True
description: Defines the maximum latency (in ms) between server and client for local connection. If connection latency is above this value wan will be set to true.
values: ["30"]
default: ["30"]
[ProductProperty]
type: unicode
name: timer_value
multivalue: False
editable: True
description: Time until installation starts (0 for immediate installation)
values: ["40"]
default: ["40"]
[ProductProperty]
type: unicode
name: timer_enabled
multivalue: False
editable: False
description: Timer enabled
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_net1.1
multivalue: False
editable: False
description: Install Microsoft Netframework 1.1
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_net2.0
multivalue: False
editable: False
description: Install Microsoft Netframework 2.0
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_net3.0
multivalue: False
editable: False
description: Install Microsoft Netframework 3.0
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_net3.5
multivalue: False
editable: False
description: Install Microsoft Netframework 3.5
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_net4.0
multivalue: False
editable: False
description: Install Microsoft Netframework 4.0
values: ["0", "1"]
default: ["0"]
[ProductProperty]
type: unicode
name: inst_net4.5
multivalue: False
editable: False
description: Install Microsoft Netframework 4.5
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_msjsharp
multivalue: False
editable: False
description: Install Microsoft Visual J-Sharp 2.0 SE
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_silver
multivalue: False
editable: False
description: Install Microsoft Silverlight 5
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_jre7
multivalue: False
editable: False
description: Install Java Runtime Environment 7
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_AdobeShock
multivalue: False
editable: False
description: Install Adobe Shockwave Player 11.6
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_basicruntimes
multivalue: False
editable: False
description: Install Basic Runtimes
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_msdx9
multivalue: False
editable: False
description: Install Microsoft DirectX 9.0c Redistributable
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_msdxm
multivalue: False
editable: False
description: Install Microsoft DirectX for Managed Code
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_msvc
multivalue: False
editable: False
description: Install Microsoft Visual C++ Runtimes
values: ["0", "1"]
default: ["1"]
[ProductProperty]
type: unicode
name: inst_AdobeFlash
multivalue: False
editable: False
description: Adobe Flash Player 11.4
values: ["0", "1"]
default: ["1"]

View File

@ -1 +0,0 @@
8fd55cd1515a4bdc240ffe9264bb63fcadb9bf75 /home/mario/.opsi-dist-cache/sereby.aio-2.0.0/X86/aio-runtimes_v2.0.0.7z

View File

@ -0,0 +1 @@
c0b248819d410af7fae7d0c132590e52eb019e12 /home/opsiproducts/.opsi-dist-cache/sereby.aio-2.0.1/X86/sereby/aio-runtimes_v2.0.1.7z

View File

@ -3,7 +3,7 @@
############################
VENDOR="sereby.org"
PN="sereby.aio"
VERSION="2.0.0"
VERSION="2.0.1"
RELEASE="1"
PRIORITY="0"
ADVICE=""
@ -25,10 +25,24 @@ DL_SOURCE[0]="http://www.chip.de/ii/102791693_ff1cd10758.jpg"
## 1: 32 & 64 Bit Runtimes
DL_FILE[1]="aio-runtimes_v${VERSION}.7z"
DL_SOURCE[1]="http://www.computerbase.de/downloads/system/all-in-one-runtimes/56930/?download"
DL_ARCH[1]="X86"
DL_SOURCE[1]="http://www.computerbase.de/downloads/system/all-in-one-runtimes/57520/?download"
DL_ARCH[1]="X86/sereby"
DL_EXTRACT_FORMAT[1]="7zip"
## 2: 32 Bit XP Net Framework 1.1,2,3.0,3.5 Runtimes
DL_FILE[2]="NET_FRAMEWORK3.5.CAB"
DL_SOURCE[2]="http://team.win-lite.de/ganesha/NET_FRAMEWORK3.5.CAB"
DL_ARCH[2]="X86/net3.5"
DL_EXTRACT_FORMAT[2]="cab"
## 3: 32 & 64 Bit XP Net Framework 4 Runtimes
DL_FILE[3]="dotNetFx40_Full_DE_x86_x64_SlimSetup.7z"
DL_SOURCE[3]="http://german-unattended.de/%7Edimpel/Addons/dotNetFx40_Full_DE_x86_x64_SlimSetup.7z"
DL_ARCH[3]="X86/net4.0"
DL_EXTRACT_FORMAT[3]="7zip"
##################
### Variables
##################
@ -39,6 +53,14 @@ WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[1]@\\svcpack\\aio-runtimes.exe"
WINST_NAME[1]=Install64Exe
WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[1]@\\svcpack\\aio-runtimes.exe"
WINST_NAME[2]=Install32_XP1_Exe
WINST_VALUE[2]="@DL_EXTRACT_WINST_PATH[2]@\\svcpack\\dotNetFX35.exe"
WINST_NAME[3]=Install32_XP2_Exe
WINST_VALUE[3]="@DL_EXTRACT_WINST_PATH[3]@\\svcpack\\dotNetFx40_Full_DE_x86_x64_SlimSetup.exe"
WINST_NAME[4]=Install_extracted_32Exe
WINST_VALUE[4]="@DL_EXTRACT_WINST_PATH[1]@\\extracted\\WinPKG.exe"
WINST_NAME[5]=Install_extracted_64Exe
WINST_VALUE[5]="@DL_EXTRACT_WINST_PATH[1]@\\extracted\\WinPKG.exe"

View File

@ -0,0 +1 @@
49003bf5d2baaf62c017fe575393a6d21dee14c0 /home/opsiproducts/.opsi-dist-cache/sereby.aio-2.0.1/X86/net4.0/dotNetFx40_Full_DE_x86_x64_SlimSetup.7z