[1021] | 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 | [Actions]
|
---|
| 7 | requiredWinstVersion >= "4.10.8.6"
|
---|
| 8 |
|
---|
| 9 | DefVar $MsiId$
|
---|
| 10 | DefVar $UninstallProgram$
|
---|
| 11 | DefVar $LogDir$
|
---|
| 12 | DefVar $ExitCode$
|
---|
| 13 | DefVar $ProductId$
|
---|
| 14 | DefVar $InstallDir$
|
---|
| 15 | DefVar $LicenseRequired$
|
---|
| 16 | DefVar $LicensePool$
|
---|
| 17 |
|
---|
| 18 | Set $LogDir$ = "%SystemDrive%\tmp"
|
---|
| 19 |
|
---|
| 20 | ; ----------------------------------------------------------------
|
---|
| 21 | ; - Please edit the following values -
|
---|
| 22 | ; ----------------------------------------------------------------
|
---|
[1031] | 23 | Set $ProductId$ = "bitlocker"
|
---|
[1021] | 24 | Set $InstallDir$ = "%ProgramFiles32Dir%\<path to the product>"
|
---|
| 25 | Set $LicenseRequired$ = "false"
|
---|
| 26 | Set $LicensePool$ = "p_" + $ProductId$
|
---|
| 27 | ; ----------------------------------------------------------------
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | comment "Show product picture"
|
---|
| 31 | ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
|
---|
| 32 |
|
---|
| 33 | Message "Uninstalling " + $ProductId$ + " ..."
|
---|
| 34 |
|
---|
| 35 | if FileExists("%ScriptPath%\delsub32.ins")
|
---|
| 36 | comment "Start uninstall sub section"
|
---|
| 37 | Sub "%ScriptPath%\delsub32.ins"
|
---|
| 38 | endif
|
---|
| 39 |
|
---|
| 40 | if $LicenseRequired$ = "true"
|
---|
| 41 | comment "Licensing required, free license used"
|
---|
| 42 | Sub_free_license
|
---|
| 43 | endif
|
---|
| 44 |
|
---|
| 45 | [Sub_free_license]
|
---|
| 46 | comment "License management is enabled and will be used"
|
---|
| 47 |
|
---|
| 48 | comment "Trying to free license used for the product"
|
---|
| 49 | DefVar $result$
|
---|
| 50 | Set $result$ = FreeLicense($LicensePool$)
|
---|
| 51 | ; If there is an assignment of a license pool to the product, it is possible to use
|
---|
| 52 | ; Set $result$ = FreeLicense("", $ProductId$)
|
---|
| 53 | ;
|
---|
| 54 | ; If there is an assignment of a license pool to a windows software id, it is possible to use
|
---|
| 55 | ; DefVar $WindowsSoftwareId$
|
---|
| 56 | ; $WindowsSoftwareId$ = "..."
|
---|
| 57 | ; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
|
---|
| 58 |
|
---|