From 39ffb2ba85710fcc04394ec2f95d898f5ed87368 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Mon, 20 Jul 2015 11:21:21 +0200 Subject: [PATCH] Add uninstall propertie for all products --- CLIENT_DATA/cleanup3264.ins | 255 +++++++++++++++++++++++++++++++++--- OPSI/control | 26 ++-- builder-targets-cb.sh | 2 +- 3 files changed, 252 insertions(+), 31 deletions(-) diff --git a/CLIENT_DATA/cleanup3264.ins b/CLIENT_DATA/cleanup3264.ins index dedd65b..7416007 100644 --- a/CLIENT_DATA/cleanup3264.ins +++ b/CLIENT_DATA/cleanup3264.ins @@ -2,6 +2,11 @@ DefVar $reboot$ Set $reboot$ = "false" if ($sereby_dotnet4.5$ = "reinstall") + Winbatch_dotnet4.5_uninstall + opsiservicecall_dotnet4.5_reinstall + Set $reboot$ = "true" +endif +if ($sereby_dotnet4.5$ = "uninstall") Winbatch_dotnet4.5_uninstall opsiservicecall_dotnet4.5_uninstall Set $reboot$ = "true" @@ -14,56 +19,111 @@ if ($reboot$ = "true") endif if ($sereby_msjsharp$ = "reinstall") + Dosbatch_msjsharp_uninstall + opsiservicecall_msjsharp_reinstall + Set $reboot$ = "true" +endif +if ($sereby_msjsharp$ = "uninstall") Dosbatch_msjsharp_uninstall opsiservicecall_msjsharp_uninstall Set $reboot$ = "true" endif if ($sereby_msfsharp$ = "reinstall") + Dosbatch_msfsharp_uninstall + opsiservicecall_msfsharp_reinstall + Set $reboot$ = "true" +endif +if ($sereby_msfsharp$ = "uninstall") Dosbatch_msfsharp_uninstall opsiservicecall_msfsharp_uninstall Set $reboot$ = "true" endif if ($sereby_silver$ = "reinstall") + Dosbatch_silver_uninstall + opsiservicecall_silver_reinstall + Set $reboot$ = "true" +endif +if ($sereby_silver$ = "uninstall") Dosbatch_silver_uninstall opsiservicecall_silver_uninstall Set $reboot$ = "true" endif if ($sereby_jre7$ = "reinstall") + Dosbatch_jre7_uninstall + opsiservicecall_jre7_reinstall + Set $reboot$ = "true" +endif +if ($sereby_jre7$ = "uninstall") Dosbatch_jre7_uninstall opsiservicecall_jre7_uninstall Set $reboot$ = "true" endif if ($sereby_jre8$ = "reinstall") + Dosbatch_jre8_uninstall + opsiservicecall_jre8_reinstall + Set $reboot$ = "true" +endif +if ($sereby_jre8$ = "uninstall") Dosbatch_jre8_uninstall opsiservicecall_jre8_uninstall Set $reboot$ = "true" endif if ($sereby_AdobeShock$ = "reinstall") + Dosbatch_AdobeShock_uninstall + opsiservicecall_AdobeShock_reinstall + Set $reboot$ = "true" +endif +if ($sereby_AdobeShock$ = "uninstall") Dosbatch_AdobeShock_uninstall opsiservicecall_AdobeShock_uninstall Set $reboot$ = "true" endif if ($sereby_basicruntimes$ = "reinstall") + Dosbatch_basicruntimes_uninstall + opsiservicecall_basicruntimes_reinstall + Set $reboot$ = "true" +endif +if ($sereby_basicruntimes$ = "uninstall") Dosbatch_basicruntimes_uninstall opsiservicecall_basicruntimes_uninstall Set $reboot$ = "true" endif if ($sereby_msdx9$ = "reinstall") + Dosbatch_msdx9_uninstall + opsiservicecall_msdx9_reinstall + Set $reboot$ = "true" +endif +if ($sereby_msdx9$ = "uninstall") Dosbatch_msdx9_uninstall opsiservicecall_msdx9_uninstall Set $reboot$ = "true" endif if ($sereby_msvc$ = "reinstall") + Dosbatch_msvc_uninstall + opsiservicecall_msvc_reinstall + Set $reboot$ = "true" +endif +if ($sereby_msvc$ = "uninstall") Dosbatch_msvc_uninstall opsiservicecall_msvc_uninstall Set $reboot$ = "true" endif if ($sereby_AdobeFlash$ = "reinstall") + Dosbatch_AdobeFlash_uninstall + opsiservicecall_AdobeFlash_reinstall + Set $reboot$ = "true" +endif +if ($sereby_AdobeFlash$ = "uninstall") Dosbatch_AdobeFlash_uninstall opsiservicecall_AdobeFlash_uninstall Set $reboot$ = "true" endif if ($sereby_AdobeAir$ = "reinstall") + Dosbatch_AdobeAir_uninstall + opsiservicecall_AdobeAir_reinstall + Set $reboot$ = "true" +endif +if ($sereby_AdobeAir$ = "uninstall") Dosbatch_AdobeAir_uninstall opsiservicecall_AdobeAir_uninstall Set $reboot$ = "true" @@ -79,7 +139,7 @@ endif %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 1.0 /u" %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 1.1 /u" -[opsiservicecall_dotnet1.1_uninstall] +[opsiservicecall_dotnet1.1_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -88,10 +148,19 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_dotnet1.1_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_dotnet1.1", +"none", +"%opsiserviceUser%" +] + [Winbatch_dotnet2.0_uninstall] %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 2.0 /u" -[opsiservicecall_dotnet2.0_uninstall] +[opsiservicecall_dotnet2.0_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -100,10 +169,19 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_dotnet2.0_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_dotnet2.0", +"none", +"%opsiserviceUser%" +] + [Winbatch_dotnet3.0_uninstall] %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 3.0 /u" -[opsiservicecall_dotnet3.0_uninstall] +[opsiservicecall_dotnet3.0_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -112,10 +190,19 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_dotnet3.0_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_dotnet3.0", +"none", +"%opsiserviceUser%" +] + [Winbatch_dotnet3.5_uninstall] %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 3.5 /u" -[opsiservicecall_dotnet3.5_uninstall] +[opsiservicecall_dotnet3.5_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -124,10 +211,19 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_dotnet3.5_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_dotnet3.5", +"none", +"%opsiserviceUser%" +] + [Winbatch_dotnet4.0_uninstall] %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 4.0 /u" -[opsiservicecall_dotnet4.0_uninstall] +[opsiservicecall_dotnet4.0_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -136,12 +232,21 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_dotnet4.0_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_dotnet4.0", +"none", +"%opsiserviceUser%" +] + [Winbatch_dotnet4.5_uninstall] %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 4.5 /u" %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 4.5.1 /u" %ScriptPath%\UnInstall\NET\cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 4.5.2 /u" -[opsiservicecall_dotnet4.5_uninstall] +[opsiservicecall_dotnet4.5_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -150,9 +255,18 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_dotnet4.5_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_dotnet4.5", +"none", +"%opsiserviceUser%" +] + [Dosbatch_msjsharp_uninstall] -[opsiservicecall_msjsharp_uninstall] +[opsiservicecall_msjsharp_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -161,9 +275,18 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_msjsharp_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_msjsharp", +"none", +"%opsiserviceUser%" +] + [Dosbatch_msfsharp_uninstall] -[opsiservicecall_msfsharp_uninstall] +[opsiservicecall_msfsharp_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -172,18 +295,35 @@ endif "%opsiserviceUser%" ] +[opsiservicecall_msfsharp_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_msfsharp", +"none", +"%opsiserviceUser%" +] + [Dosbatch_silver_uninstall] ; wmic product where caption='Microsoft Silverlight' call uninstall ;"%ScriptPath%\UnInstall\Package\Silverlight\CleanSilverlight.cmd" wmic /INTERACTIVE:OFF product where name="Microsoft Silverlight" call uninstall +[opsiservicecall_silver_reinstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_silver", +"install", +"%opsiserviceUser%" +] [opsiservicecall_silver_uninstall] "method": "setProductProperty" "params": [ "$ProductId$", "sereby_silver", -"install", +"none", "%opsiserviceUser%" ] @@ -199,11 +339,29 @@ rem copy "%ScriptPath%\UnInstall\Packages\JRE\JavaRa.*" "$LogDir$\" rem $LogDir$\JavaRa.exe /SILENT /PURGE /UPDATEDEFS cscript /nologo "%ScriptPath%\UnInstall\Packages\JRE\JavaUninstallScript.vbs" /keeponly +[opsiservicecall_jre7_reinstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_jre7", +"install", +"%opsiserviceUser%" +] + [opsiservicecall_jre7_uninstall] "method": "setProductProperty" "params": [ "$ProductId$", "sereby_jre7", +"none", +"%opsiserviceUser%" +] + +[opsiservicecall_jre8_reinstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_jre8", "install", "%opsiserviceUser%" ] @@ -213,7 +371,7 @@ cscript /nologo "%ScriptPath%\UnInstall\Packages\JRE\JavaUninstallScript.vbs" /k "params": [ "$ProductId$", "sereby_jre8", -"install", +"none", "%opsiserviceUser%" ] @@ -221,7 +379,7 @@ cscript /nologo "%ScriptPath%\UnInstall\Packages\JRE\JavaUninstallScript.vbs" /k "%ScriptPath%\UnInstall\Packages\Shockwave\uninstall_shock_player.exe" /s wmic /INTERACTIVE:OFF product where name="Adobe Shockwave Player 12.0" call uninstall -[opsiservicecall_AdobeShock_uninstall] +[opsiservicecall_AdobeShock_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -230,10 +388,19 @@ wmic /INTERACTIVE:OFF product where name="Adobe Shockwave Player 12.0" call unin "%opsiserviceUser%" ] +[opsiservicecall_AdobeShock_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_adobeshock", +"none", +"%opsiserviceUser%" +] + [Dosbatch_basicruntimes_uninstall] wmic /INTERACTIVE:OFF product where name="Allgemeine Runtime Files (x86)" call uninstall -[opsiservicecall_basicruntimes_uninstall] +[opsiservicecall_basicruntimes_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -242,9 +409,18 @@ wmic /INTERACTIVE:OFF product where name="Allgemeine Runtime Files (x86)" call u "%opsiserviceUser%" ] +[opsiservicecall_basicruntimes_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_basicruntimes", +"none", +"%opsiserviceUser%" +] + [Dosbatch_msdx9_uninstall] -[opsiservicecall_msdx9_uninstall] +[opsiservicecall_msdx9_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -253,9 +429,18 @@ wmic /INTERACTIVE:OFF product where name="Allgemeine Runtime Files (x86)" call u "%opsiserviceUser%" ] +[opsiservicecall_msdx9_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_msdx9", +"none", +"%opsiserviceUser%" +] + [Dosbatch_msdxm_uninstall] -[opsiservicecall_msdxm_uninstall] +[opsiservicecall_msdxm_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -264,9 +449,18 @@ wmic /INTERACTIVE:OFF product where name="Allgemeine Runtime Files (x86)" call u "%opsiserviceUser%" ] +[opsiservicecall_msdxm_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_msdxm", +"none", +"%opsiserviceUser%" +] + [Dosbatch_msvc_uninstall] -[opsiservicecall_msvc_uninstall] +[opsiservicecall_msvc_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -275,10 +469,19 @@ wmic /INTERACTIVE:OFF product where name="Allgemeine Runtime Files (x86)" call u "%opsiserviceUser%" ] +[opsiservicecall_msvc_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_msvc", +"none", +"%opsiserviceUser%" +] + [Dosbatch_AdobeFlash_uninstall] $UninstallFlashExe$ -uninstall -[opsiservicecall_AdobeFlash_uninstall] +[opsiservicecall_AdobeFlash_reinstall] "method": "setProductProperty" "params": [ "$ProductId$", @@ -287,15 +490,33 @@ $UninstallFlashExe$ -uninstall "%opsiserviceUser%" ] +[opsiservicecall_AdobeFlash_uninstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_adobeflash", +"none", +"%opsiserviceUser%" +] + [Dosbatch_AdobeAir_uninstall] wmic /INTERACTIVE:OFF product where name="Adobe AIR" call uninstall +[opsiservicecall_AdobeAir_reinstall] +"method": "setProductProperty" +"params": [ +"$ProductId$", +"sereby_adobeair", +"install", +"%opsiserviceUser%" +] + [opsiservicecall_AdobeAir_uninstall] "method": "setProductProperty" "params": [ "$ProductId$", "sereby_adobeair", -"install", +"none", "%opsiserviceUser%" ] diff --git a/OPSI/control b/OPSI/control index 6da88c6..5fddcf7 100644 --- a/OPSI/control +++ b/OPSI/control @@ -60,7 +60,7 @@ name: sereby_dotnet4.5 multivalue: False editable: False description: Install Microsoft Netframework 4.5 -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -69,7 +69,7 @@ name: sereby_win8xdotnet3x multivalue: False editable: False description: Install Microsoft Netframework 2 - 3.x -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -78,7 +78,7 @@ name: sereby_msjsharp multivalue: False editable: False description: Install Microsoft Visual J-Sharp 2.0 SE -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -87,7 +87,7 @@ name: sereby_msfsharp multivalue: False editable: False description: Install Microsoft Visual F-Sharp 2.0 SE -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -96,7 +96,7 @@ name: sereby_silver multivalue: False editable: False description: Install Microsoft Silverlight 5 -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -105,7 +105,7 @@ name: sereby_jre7 multivalue: False editable: False description: Install Java 7 Runtime Environment -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["none"] [ProductProperty] @@ -114,7 +114,7 @@ name: sereby_jre8 multivalue: False editable: False description: Install Java 8 Runtime Environment -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -123,7 +123,7 @@ name: sereby_AdobeShock multivalue: False editable: False description: Install Adobe Shockwave Player 11.6 -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -132,7 +132,7 @@ name: sereby_basicruntimes multivalue: False editable: False description: Install Basic Runtimes -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -141,7 +141,7 @@ name: sereby_msdx9 multivalue: False editable: False description: Install Microsoft DirectX 9.0c Redistributable -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -150,7 +150,7 @@ name: sereby_msvc multivalue: False editable: False description: Install Microsoft Visual C++ Runtimes -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -159,7 +159,7 @@ name: sereby_AdobeFlash multivalue: False editable: False description: Adobe Flash Player -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] [ProductProperty] @@ -168,7 +168,7 @@ name: sereby_AdobeAir multivalue: False editable: False description: Adobe AIR -values: ["install", "none", "reinstall"] +values: ["install", "none", "reinstall", "uninstall"] default: ["install"] diff --git a/builder-targets-cb.sh b/builder-targets-cb.sh index 18ccf1f..be34d15 100644 --- a/builder-targets-cb.sh +++ b/builder-targets-cb.sh @@ -168,7 +168,7 @@ function create() { mv -v $INST_DIR/CLIENT_DATA/Sereby_JRE7_package.xml $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v7/package.xml mv $INST_DIR/CLIENT_DATA/X86/jre7u${JRE7UVERSION}-b${JRE7BUILD}-x86.exe $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v7/x86/jre.exe mv $INST_DIR/CLIENT_DATA/X86/jre7u${JRE7UVERSION}-b${JRE7BUILD}-x64.exe $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v7/x64/jre.exe - patch_package_xml $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v7/package.xml "/package/variable[@name='NAME']/@value" "Java Runtime Environment 7 Update ${JRE7UVERSION}" + patch_package_xml $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v7/package.xml "/package/variable[@name='NAME']/@value" "Java Runtime Environment 7 Update ${JRE7UVERSION} (No Public Updates after April 2015)" patch_package_xml $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v7/package.xml "/package/variable[@name='BUILD']/@value" "${JRE7VERSION}" sed -e 's!/s!/s REBOOT=Suppress!' -i $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v7/package.xml else