source: opsi/products/bitlocker/CLIENT_DATA/delsub.ins@ 1185

Last change on this file since 1185 was 1021, checked in by joergs, on Jun 18, 2012 at 9:25:50 PM

bitlocker initial

File size: 3.2 KB
Line 
1; Copyright (c) uib gmbh (www.uib.de)
2; This sourcecode is owned by uib gmbh
3; and published under the Terms of the General Public License.
4; credits: http://www.opsi.org/en/credits/
5
6
7Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'
8Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
9
10Message "Uninstalling " + $ProductId$ + " ..."
11
12if FileExists($UninstallProgram$)
13 comment "Uninstall program found, starting uninstall"
14 Winbatch_uninstall
15 sub_check_exitcode
16endif
17if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
18 comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
19 Winbatch_uninstall_msi
20 sub_check_exitcode
21endif
22
23comment "Delete files"
24Files_uninstall /32Bit
25
26comment "Cleanup registry"
27Registry_uninstall /32Bit
28
29comment "Delete program shortcuts"
30LinkFolder_uninstall
31
32[Winbatch_uninstall]
33; Choose one of the following examples as basis for program uninstall
34;
35; === Nullsoft Scriptable Install System ================================================================
36; "$UninstallProgram$" /S
37;
38; === Inno Setup ========================================================================================
39; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
40
41
42[Winbatch_uninstall_msi]
43msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
44
45[Files_uninstall]
46; Example for recursively deleting the installation directory (don't forget the trailing backslash):
47;
48; delete -sf "$InstallDir$\"
49
50[Registry_uninstall]
51; Example of deleting a registry key:
52;
53; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
54
55[LinkFolder_uninstall]
56; Example of deleting a folder from AllUsers startmenu:
57;
58; set_basefolder common_programs
59; delete_subfolder $ProductId$
60;
61; Example of deleting a shortcut from AllUsers desktop:
62;
63; set_basefolder common_desktopdirectory
64; set_subfolder ""
65; delete_element $ProductId$
66
67[Sub_check_exitcode]
68comment "Test for installation success via exit code"
69set $ExitCode$ = getLastExitCode
70; informations to exit codes see
71; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
72; http://msdn.microsoft.com/en-us/library/aa368542.aspx
73if ($ExitCode$ = "0")
74 comment "Looks good: setup program gives exitcode zero"
75else
76 comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
77 if ($ExitCode$ = "1605")
78 comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
79 comment "Uninstall of a not installed product failed - no problem"
80 else
81 if ($ExitCode$ = "1641")
82 comment "looks good: setup program gives exitcode 1641"
83 comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
84 else
85 if ($ExitCode$ = "3010")
86 comment "looks good: setup program gives exitcode 3010"
87 comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
88 else
89 logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
90 isFatalError
91 endif
92 endif
93 endif
94endif
95
Note: See TracBrowser for help on using the repository browser.