source: opsi/products/xenserver-tools/CLIENT_DATA/uninstall.ins@ 1001

Last change on this file since 1001 was 950, checked in by joergs, on Jun 18, 2011 at 11:42:56 PM

adapted for Citrix XenServer Tools

File size: 2.3 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/credits/
5
6[Actions]
7requiredWinstVersion >= "4.10.8.6"
8
9DefVar $MsiId32$
10DefVar $UninstallProgram32$
11DefVar $MsiId64$
12DefVar $UninstallProgram64$
13DefVar $LogDir$
14DefVar $ExitCode$
15DefVar $ProductId$
16DefVar $InstallDir32$
17DefVar $InstallDir64$
18DefVar $LicenseRequired$
19DefVar $LicensePool$
20DefVar $INST_SystemType$
21DefVar $INST_architecture$
22
23Set $INST_SystemType$ = GetSystemType
24set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
25
26
27Set $LogDir$ = "%SystemDrive%\tmp"
28
29; ----------------------------------------------------------------
30; - Please edit the following values -
31; ----------------------------------------------------------------
32Set $ProductId$ = "xenserver-tools"
33Set $InstallDir32$ = "%ProgramFiles32Dir%\Citrix\XenTools"
34Set $InstallDir64$ = "%ProgramFiles64Dir%\Citrix\XenTools"
35Set $LicenseRequired$ = "false"
36Set $LicensePool$ = "p_" + $ProductId$
37; ----------------------------------------------------------------
38
39
40comment "Show product picture"
41ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
42
43Message "Uninstalling " + $ProductId$ + " ..."
44
45if FileExists("%ScriptPath%\delsub.ins")
46 comment "Start uninstall sub section"
47 Sub "%ScriptPath%\delsub.ins"
48endif
49
50if $LicenseRequired$ = "true"
51 comment "Licensing required, free license used"
52 Sub_free_license
53endif
54
55[Sub_free_license]
56if opsiLicenseManagementEnabled
57 comment "License management is enabled and will be used"
58
59 comment "Trying to free license used for the product"
60 DefVar $result$
61 Set $result$ = FreeLicense($LicensePool$)
62 ; If there is an assignment of a license pool to the product, it is possible to use
63 ; Set $result$ = FreeLicense("", $ProductId$)
64 ;
65 ; If there is an assignment of a license pool to a windows software id, it is possible to use
66 ; DefVar $WindowsSoftwareId$
67 ; $WindowsSoftwareId$ = "..."
68 ; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
69else
70 LogError "Error: licensing required, but license management not enabled"
71 isFatalError
72endif
73
74
75
Note: See TracBrowser for help on using the repository browser.