source: opsi/products/xenserver-tools/CLIENT_DATA/uninstall32.ins@ 949

Last change on this file since 949 was 949, checked in by joergs, on Jun 18, 2011 at 7:21:18 PM

opsi-template

File size: 1.9 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 $MsiId$
10DefVar $UninstallProgram$
11DefVar $LogDir$
12DefVar $ExitCode$
13DefVar $ProductId$
14DefVar $InstallDir$
15DefVar $LicenseRequired$
16DefVar $LicensePool$
17
18Set $LogDir$ = "%SystemDrive%\tmp"
19
20; ----------------------------------------------------------------
21; - Please edit the following values -
22; ----------------------------------------------------------------
23Set $ProductId$ = "opsi-template"
24Set $InstallDir$ = "%ProgramFiles32Dir%\<path to the product>"
25Set $LicenseRequired$ = "false"
26Set $LicensePool$ = "p_" + $ProductId$
27; ----------------------------------------------------------------
28
29
30comment "Show product picture"
31ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
32
33Message "Uninstalling " + $ProductId$ + " ..."
34
35if FileExists("%ScriptPath%\delsub32.ins")
36 comment "Start uninstall sub section"
37 Sub "%ScriptPath%\delsub32.ins"
38endif
39
40if $LicenseRequired$ = "true"
41 comment "Licensing required, free license used"
42 Sub_free_license
43endif
44
45[Sub_free_license]
46if opsiLicenseManagementEnabled
47 comment "License management is enabled and will be used"
48
49 comment "Trying to free license used for the product"
50 DefVar $result$
51 Set $result$ = FreeLicense($LicensePool$)
52 ; If there is an assignment of a license pool to the product, it is possible to use
53 ; Set $result$ = FreeLicense("", $ProductId$)
54 ;
55 ; If there is an assignment of a license pool to a windows software id, it is possible to use
56 ; DefVar $WindowsSoftwareId$
57 ; $WindowsSoftwareId$ = "..."
58 ; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
59else
60 LogError "Error: licensing required, but license management not enabled"
61 isFatalError
62endif
63
64
65
Note: See TracBrowser for help on using the repository browser.