correct the msiids
This commit is contained in:
parent
d50c876ef1
commit
0cdaef9c48
@ -4,21 +4,13 @@
|
||||
; credits: http://www.opsi.org/credits/
|
||||
|
||||
|
||||
Set $MsiId32$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'
|
||||
Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe"
|
||||
Set $MsiId32$ = '{86DE5D5D-7F44-4D9E-803C-4298732C16A3}'
|
||||
|
||||
Set $MsiId64$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'
|
||||
Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe"
|
||||
Set $MsiId64$ = '{984E6987-6A7E-4F2D-AF7F-68BBB3BD68AD}'
|
||||
|
||||
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
|
||||
Message "Uninstalling " + $ProductId$ + " 32 Bit..."
|
||||
|
||||
if FileExists($UninstallProgram32$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_32
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_32
|
||||
@ -34,12 +26,6 @@ endif
|
||||
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
|
||||
Message "Uninstalling " + $ProductId$ + " 64 Bit..."
|
||||
|
||||
if FileExists($UninstallProgram64$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_64
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_64
|
||||
|
@ -7,18 +7,13 @@
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId32$
|
||||
DefVar $UninstallProgram32$
|
||||
DefVar $MsiId64$
|
||||
DefVar $UninstallProgram64$
|
||||
DefVar $LogDir$
|
||||
DefVar $ProductId$
|
||||
DefVar $MinimumSpace$
|
||||
DefVar $InstallDir32$
|
||||
DefVar $InstallDir64$
|
||||
DefVar $ExitCode$
|
||||
DefVar $LicenseRequired$
|
||||
DefVar $LicenseKey$
|
||||
DefVar $LicensePool$
|
||||
DefVar $INST_SystemType$
|
||||
DefVar $INST_architecture$
|
||||
DefVar $Path$
|
||||
@ -50,8 +45,6 @@ Set $MinimumSpace$ = "10 MB"
|
||||
; the path were we find the product after the installation
|
||||
Set $InstallDir32$ = "%Systemdrive%\WinDDK"
|
||||
Set $InstallDir64$ = "%Systemdrive%\WinDDK"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
||||
@ -67,11 +60,6 @@ else
|
||||
Sub "%ScriptPath%\delsub3264.ins"
|
||||
endif
|
||||
|
||||
if $LicenseRequired$ = "true"
|
||||
comment "Licensing required, reserve license and get license key"
|
||||
Sub_get_licensekey
|
||||
endif
|
||||
|
||||
comment "installing"
|
||||
|
||||
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
|
||||
@ -126,7 +114,7 @@ msiexec /i "$InstallDfx64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! A
|
||||
[Registry_install_64]
|
||||
openkey [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\control\Session Manager\Environment]
|
||||
set "Path"="$Path$"
|
||||
supp "Path"; "$InstallDir64$\$WinDdkVersion$\redist/DIFx/dpinst/EngMui/x64"
|
||||
supp "Path"; "$InstallDir64$\$WinDdkVersion$\redist/DIFx/dpinst/EngMui/amd64"
|
||||
|
||||
[LinkFolder_install]
|
||||
; Example of deleting a folder from AllUsers startmenu:
|
||||
@ -162,38 +150,6 @@ supp "Path"; "$InstallDir64$\$WinDdkVersion$\redist/DIFx/dpinst/EngMui/x64"
|
||||
; icon_index: 2
|
||||
; end_link
|
||||
|
||||
[Sub_get_licensekey]
|
||||
comment "License management is enabled and will be used"
|
||||
|
||||
comment "Trying to get a license key"
|
||||
Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
|
||||
; If there is an assignment of exactly one licensepool to the product the following call is possible:
|
||||
; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$)
|
||||
;
|
||||
; If there is an assignment of a license pool to a windows software id, it is possible to use:
|
||||
; DefVar $WindowsSoftwareId$
|
||||
; $WindowsSoftwareId$ = "..."
|
||||
; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$)
|
||||
|
||||
DefVar $ServiceErrorClass$
|
||||
set $ServiceErrorClass$ = getLastServiceErrorClass
|
||||
comment "Error class: " + $ServiceErrorClass$
|
||||
|
||||
if $ServiceErrorClass$ = "None"
|
||||
comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
|
||||
else
|
||||
if $ServiceErrorClass$ = "LicenseConfigurationError"
|
||||
LogError "Fatal: license configuration must be corrected"
|
||||
LogError getLastServiceErrorMessage
|
||||
isFatalError
|
||||
else
|
||||
if $ServiceErrorClass$ = "LicenseMissingError"
|
||||
LogError "Fatal: required license is not supplied"
|
||||
isFatalError
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
[Sub_check_exitcode]
|
||||
comment "Test for installation success via exit code"
|
||||
set $ExitCode$ = getLastExitCode
|
||||
|
@ -7,16 +7,12 @@
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId32$
|
||||
DefVar $UninstallProgram32$
|
||||
DefVar $MsiId64$
|
||||
DefVar $UninstallProgram64$
|
||||
DefVar $LogDir$
|
||||
DefVar $ExitCode$
|
||||
DefVar $ProductId$
|
||||
DefVar $InstallDir32$
|
||||
DefVar $InstallDir64$
|
||||
DefVar $LicenseRequired$
|
||||
DefVar $LicensePool$
|
||||
DefVar $INST_SystemType$
|
||||
DefVar $INST_architecture$
|
||||
|
||||
@ -42,8 +38,6 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
Set $ProductId$ = "microsoft.driverkit"
|
||||
Set $InstallDir32$ = "%Systemdrive%\WinDDK"
|
||||
Set $InstallDir64$ = "%Systemdrive%\WinDDK"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
|
||||
@ -57,23 +51,3 @@ if FileExists("%ScriptPath%\delsub3264.ins")
|
||||
Sub "%ScriptPath%\delsub3264.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$)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user