[1022] | 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 $MsiId32$
|
---|
| 10 | DefVar $UninstallProgram32$
|
---|
| 11 | DefVar $MsiId64$
|
---|
| 12 | DefVar $UninstallProgram64$
|
---|
| 13 | DefVar $LogDir$
|
---|
| 14 | DefVar $ExitCode$
|
---|
| 15 | DefVar $ProductId$
|
---|
| 16 | DefVar $InstallDir32$
|
---|
| 17 | DefVar $InstallDir64$
|
---|
| 18 | DefVar $LicenseRequired$
|
---|
| 19 | DefVar $LicensePool$
|
---|
| 20 | DefVar $INST_SystemType$
|
---|
| 21 | DefVar $INST_architecture$
|
---|
| 22 |
|
---|
| 23 | Set $INST_SystemType$ = GetSystemType
|
---|
| 24 | set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 | Set $LogDir$ = "%SystemDrive%\tmp"
|
---|
| 28 |
|
---|
| 29 | ; ----------------------------------------------------------------
|
---|
| 30 | ; - Please edit the following values -
|
---|
| 31 | ; ----------------------------------------------------------------
|
---|
| 32 | Set $ProductId$ = "opsi-template"
|
---|
[1023] | 33 | Set $InstallDir32$ = "%ProgramFiles32Dir%\Bacula"
|
---|
| 34 | Set $InstallDir64$ = "%ProgramFiles64Dir%\Bacula"
|
---|
[1022] | 35 | Set $LicenseRequired$ = "false"
|
---|
| 36 | Set $LicensePool$ = "p_" + $ProductId$
|
---|
| 37 | ; ----------------------------------------------------------------
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 | comment "Show product picture"
|
---|
| 41 | ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
|
---|
| 42 |
|
---|
| 43 | Message "Uninstalling " + $ProductId$ + " ..."
|
---|
| 44 |
|
---|
| 45 | if FileExists("%ScriptPath%\delsub3264.ins")
|
---|
| 46 | comment "Start uninstall sub section"
|
---|
| 47 | Sub "%ScriptPath%\delsub3264.ins"
|
---|
| 48 | endif
|
---|
| 49 |
|
---|
[1023] | 50 | ;if $LicenseRequired$ = "true"
|
---|
| 51 | ; comment "Licensing required, free license used"
|
---|
| 52 | ; Sub_free_license
|
---|
| 53 | ;endif
|
---|
[1022] | 54 |
|
---|
| 55 | [Sub_free_license]
|
---|
| 56 | comment "License management is enabled and will be used"
|
---|
| 57 |
|
---|
| 58 | comment "Trying to free license used for the product"
|
---|
| 59 | DefVar $result$
|
---|
| 60 | Set $result$ = FreeLicense($LicensePool$)
|
---|
| 61 | ; If there is an assignment of a license pool to the product, it is possible to use
|
---|
| 62 | ; Set $result$ = FreeLicense("", $ProductId$)
|
---|
| 63 | ;
|
---|
| 64 | ; If there is an assignment of a license pool to a windows software id, it is possible to use
|
---|
| 65 | ; DefVar $WindowsSoftwareId$
|
---|
| 66 | ; $WindowsSoftwareId$ = "..."
|
---|
| 67 | ; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
|
---|
| 68 |
|
---|
| 69 |
|
---|