Views
WinstScripts
>>
uninstalloff2007
last edited 1 year ago by bwolf
; Copyright (c) uib umwelt informatik bro gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
[Initial]
LogLevel=2
; Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
[Aktionen]
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $NewExe$
DefVar $InstallDir$
DefVar $InstallCommand$
; This should be edited
set $ProductId$ = "Office 2007"
set $MinimumSpace$ = "30 MB"
DefVar $TEMP$
Set $TEMP$ = EnvVar("TEMP")
;Variables for OS version
DefVar $OS$
DefVar $MinorOS$
DefVar $IstServicePack$
set $OS$ = GetOS
set $MinorOS$ = GetNTVersion
Set $IstServicePack$ = GetRegistryStringValue("[HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion] CSDVersion")
ShowBitmap /3 "%scriptpath%\winflag.bmp" "Office2007"
; Message at install time:
Message "DEInstalling "+$ProductId$+" ..."
; is this a winxp system ?
if ( $OS$ = "Windows_NT" and $MinorOS$="WinXP")
if FileExists("%ScriptPath%\delsub.ins")
sub "%ScriptPath%\delsub.ins"
endif
endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; delsub.ins
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Message "Deinstalling "+$ProductId$+" ..."
DefVar $UninstallCommand$
DefVar $DisplayName$
DefVar $UninstallReg$
DefVar $MsiCode$
set $UninstallReg$="[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
set $MsiCode$="{90120000-0030-0000-0000-0000000FF1CE}"
set $DisplayName$ = GetRegistryStringValue (""+$UninstallReg$+$MsiCode$+"] DisplayName")
if not ($DisplayName$ = "")
Message "Found "+$DisplayName$+" => uninstalling first"
Files_copy_config.xml
XMLPatch_config.xml "c:\tmp\config.xml"
Set $InstallCommand$ = "p:\install\off2007\Setup.exe "
Set $InstallCommand$ = $InstallCommand$ + " /modify Enterprise "
Set $InstallCommand$ = $InstallCommand$ + "/config c:\tmp\config.xml"
Winbatch_install
Message "Deinstalling "+$ProductId$+" DAUERT LANGE!"
set $UninstallCommand$ = "MsiExec.exe /x "+$MsiCode$+" /qb-! REBOOT=ReallySuppress"
; Winbatch_uninstall /Waitseconds 1800
Winbatch_uninstall /Waitseconds 600
Winbatch_sleep
;
;LinkFolder_del_desktop
endif
[Files_copy_config.xml]
copy -v "%SCRIPTPATH%\config.xml" "c:\tmp"
[Winbatch_install]
$InstallCommand$
[Winbatch_uninstall]
$UninstallCommand$
[XMLPatch_config.xml]
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="ACCESSFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="OUTLOOKFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="GrooveFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="OneNoteFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="OneNoteFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="WORDFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="EXCELFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="PPTFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="PubPrimary"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="RMSFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="VisualStudio_PreviewServer_SPD"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="XDOCSFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="SHAREDFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
OpenNodeSet
- error_when_no_node_existing false
- warning_when_no_node_existing true
- error_when_nodecount_greater_1 false
- warning_when_nodecount_greater_1 true
- create_when_node_not_existing true
- attributes_strict false
documentroot
all_childelements_with:
elementname: "OptionState"
attribute:"Id" value="TOOLSFiles"
attribute: "State" value="absent"
attribute: "Children" value="force"
end
[Winbatch_sleep]
sleep 20
file: http://www.opsi.org/opsi_wiki/Uninstalloff2007/delsub.ins