wir haben vor ein paar Tagen das Lizenzmodul gekauft. Nun bin ich dabei ein Paket mit den entsprechenden Winst Kommandos zu versehen.
Soweit funktioniert das, bozogen auf die Installation, auch ganz gut. Beim Uninstall hingegen, wird die Lizenz leider nicht freigegeben.
Hier mein Uninstall Script:
Code: Alles auswählen
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/
;
; License Management removed
[Actions]
requiredWinstVersion >= "4.10.8.6"
;DefVar $MsiId32$
;DefVar $UninstallProgram32$
;DefVar $MsiId64$
;DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
;DefVar $InstallDir32$
;DefVar $InstallDir64$
DefVar $INST_SystemType$
;DefVar $INST_architecture$
DefVar $LicenseRequired$
DefVar $licensepool$
Set $INST_SystemType$ = GetSystemType
;set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "%installingProdName%"
Set $licensepool$ = "p_" + $ProductId$
Set $LicenseRequired$ = "true"
;Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
;Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
; ----------------------------------------------------------------
comment "Show product picture"
ShowBitmap "%ScriptPath%\dragon.png" $ProductId$
Message "Deinstalliere " + $ProductId$ + " ..."
if FileExists("%ScriptPath%\delsub.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins"
endif
if $LicenseRequired$ = "true"
comment "Licensing required, free license used"
Sub_free_license
endif
[Sub_free_license]
comment "License management is enabled and will be used"
comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
Code: Alles auswählen
[6] [Jun 29 16:17:00:395] [dragon-naturally-speaking] ~~~~~~~ Start Sub ~~~~~~~ Sub_free_license
[5] [Jun 29 16:17:00:395] [dragon-naturally-speaking] comment: License management is enabled and will be used
[5] [Jun 29 16:17:00:395] [dragon-naturally-speaking] comment: Trying to free license used for the product
[5] [Jun 29 16:17:00:395] [dragon-naturally-speaking] Set $result$ = FreeLicense("", $ProductId$)
[2] [Jun 29 16:17:00:395] [dragon-naturally-speaking] Syntax Error in Section: Sub_free_license (Command in line 64 origin: p:\dragon-naturally-speaking\uninstall.ins line: 65): $result$ = FreeLicense($LicensePool$) -> FreeLicense("", $ProductId$) no valid expression for a string list
[6] [Jun 29 16:17:08:816] [dragon-naturally-speaking]
[6] [Jun 29 16:17:08:816] [dragon-naturally-speaking] ~~~~~~~ End Sub ~~~~~~~ Sub_free_license
[6] [Jun 29 16:17:08:816] [dragon-naturally-speaking]
[2] [Jun 29 16:17:08:816] [dragon-naturally-speaking] Syntax Error in Section: Actions (Command in line 56 origin: p:\dragon-naturally-speaking\uninstall.ins line: 57): EndIf -> expected
[1] [Jun 29 16:17:09:746] [dragon-naturally-speaking] ___________________
[1] [Jun 29 16:17:09:746] [dragon-naturally-speaking] script finished
Was könnte die Ursache für den Fehler sein? Ich hoffe ihr könnt mir weiterhelfen.
Vielen Dank im Voraus
Carsten