first round of update (getting the msi id is complicated)

This commit is contained in:
Mario Fetka
2013-03-14 17:10:58 +01:00
parent 9025fb13fb
commit db9eb4d1b0
11 changed files with 105 additions and 116 deletions

View File

@@ -1,18 +1,20 @@
; 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/credits/
; credits: http://www.opsi.org/en/credits/
Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe"
Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe"
Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini"
Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini"
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($IniFile32$)
Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","")
Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","")
Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","")
endif
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..."
if FileExists($IniFile32$)
Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
@@ -22,13 +24,6 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
sub_check_exitcode
endif
endif
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
@@ -42,7 +37,12 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
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($IniFile64$)
Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","")
Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","")
Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","")
endif
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..."
if FileExists($IniFile64$)
Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
@@ -52,12 +52,6 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
sub_check_exitcode
endif
endif
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
@@ -73,16 +67,6 @@ endif
comment "Delete program shortcuts"
LinkFolder_uninstall
[Winbatch_uninstall_32]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
; "$UninstallProgram32$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES
[Winbatch_uninstall_msi_old_32]
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
@@ -90,21 +74,9 @@ msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
[Files_uninstall_32]
delete "$IniFile32$"
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
; delete -sf "$InstallDir32$\"
[Winbatch_uninstall_64]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
; "$UninstallProgram64$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES
delete -sf "$InstallDir32$\"
[Winbatch_uninstall_msi_old_64]
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
@@ -113,11 +85,9 @@ msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
[Files_uninstall_64]
delete "$IniFile64$"
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
; Example for recursively deleting the installation directory:
;
; delete -sf "$InstallDir64$\"
del -sf "$InstallDir64$\"
[Registry_uninstall]
; Example of deleting a registry key:

24
CLIENT_DATA/login.ins Normal file
View File

@@ -0,0 +1,24 @@
; 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/
[Actions]
Message "Profile Patch for VLC ...."
comment "Did we run this script before ? - and set version stamp in profile"
if getValue("installationstate", getProductMap) = "installed"
comment "Product is installed"
if not (scriptWasExecutedBefore)
comment "loginscript was not run yet "
Files_profile_copy
Registry_currentuser_set
endif
endif
[Files_profile_copy]
copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME"
[Registry_currentuser_set]
openkey [HKCU\Software\ACME]
set "show_greeting_window" = "no"

View File

@@ -1,18 +1,14 @@
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
; credits: http://www.opsi.org/en/credits/
[Actions]
requiredWinstVersion >= "4.10.8.6"
requiredWinstVersion >= "4.11.2.6"
; DefVar $MsiId32$
DefVar $MsiIdOld32$
DefVar $UninstallProgram32$
DefVar $IniFile32$
; DefVar $MsiId64$
DefVar $MsiIdOld64$
DefVar $UninstallProgram64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$
@@ -26,11 +22,13 @@ DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
@@ -49,23 +47,23 @@ Set $LogDir$ = "%SystemDrive%\tmp"
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "nitro.pdfpro"
Set $MinimumSpace$ = "200 MB"
Set $MinimumSpace$ = "1 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\Nitro PDF\Reader 2"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Nitro PDF\Reader 2"
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
Set $LicenseRequired$ = "true"
Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section"
@@ -80,11 +78,11 @@ else
comment "installing"
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Installing " + $ProductId$ + " 32 Bit..."
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
comment "Extract the setup programm"
Winbatch_extract_32
Sub_check_exitcode
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_32
Sub_check_exitcode
comment "Copy files"
@@ -96,11 +94,11 @@ else
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Installing " + $ProductId$ + " 64 Bit..."
Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
comment "Extract the setup programm"
Winbatch_extract_64
Sub_check_exitcode
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_64
Sub_check_exitcode
comment "Copy files"
@@ -117,9 +115,10 @@ endif
"$Install32Exe$" /EXTRACTMSI:$LogDir$\nitropro-32.msi
[Winbatch_install_32]
msiexec /i "$LogDir$\nitropro-32.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
msiexec /i "$LogDir$\nitropro-32.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
[Files_install_32]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir32$"
; Example of recursively copying some files into the installation directory:
@@ -130,9 +129,10 @@ copy "$IniCfgFile$" "$InstallDir32$"
"$Install64Exe$" /EXTRACTMSI:$LogDir$\nitropro-64.msi
[Winbatch_install_64]
msiexec /i "$LogDir$\nitropro-64.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
msiexec /i "$LogDir$\nitropro-64.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
[Files_install_64]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir64$"
; Example of recursively copying some files into the installation directory:

View File

@@ -1,18 +1,14 @@
; 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/credits/
; credits: http://www.opsi.org/en/credits/
[Actions]
requiredWinstVersion >= "4.10.8.6"
requiredWinstVersion >= "4.11.2.6"
; DefVar $MsiId32$
DefVar $MsiIdOld32$
DefVar $UninstallProgram32$
DefVar $IniFile32$
; DefVar $MsiId64$
DefVar $MsiIdOld64$
DefVar $UninstallProgram64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$
@@ -24,11 +20,13 @@ DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
@@ -44,16 +42,16 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "nitro.pdfpro"
Set $InstallDir32$ = "%ProgramFiles32Dir%\Nitro PDF\Reader 2"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Nitro PDF\Reader 2"
Set $LicenseRequired$ = "true"
Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
Message "Uninstalling " + $ProductId$ + " ..."

View File

@@ -1 +0,0 @@
46563f5dde8007c3f60d3bca9fcabd052cc2de09 /home/mario/.opsi-dist-cache/nitro.pdfpro-7.5.0.15//Nitro-PDF-Pro.png

View File

@@ -3,8 +3,10 @@
############################
VENDOR="nitropdf.com"
PN="nitro.pdfpro"
VERSION="7.5.0.29"
RELEASE="1"
NAME="Nitro PDF Pro 8"
DESCRIPTION="Mit Nitro Pro 8 koennen Sie auf einfache Weise von nahezu jedem Dateiformat PDF-Dateien erstellen, die dem Branchenstandard entsprechen."
VERSION="8.5.1.10"
RELEASE="3"
PRIORITY="0"
ADVICE=""
@@ -13,29 +15,24 @@ ADVICE=""
TYPE="public"
DL_FILE[0]="Nitro-PDF-Pro.png"
DL_SOURCE[0]="http://www.wanted-software.com/wp-content/uploads/2012/06/Nitro-pdf-Pro-7-7.4-crack-keygen-patch-icon-logo-140x140.png"
DL_FILE[0]="nitro7_200x175.gif"
DL_SOURCE[0]="http://www.softwarecrew.com/wp-content/uploads/2011/11/nitro7_200x175.gif"
DL_FILE[1]="nitro_pdf_professional_${VERSION}_x86.exe"
DL_SOURCE[1]="http://install.nitropdf.com/professional/de/nitro_pdf_professional7_de.exe"
DL_FILE[1]="nitro_pro8_de_x86_${VERSION}.exe"
DL_SOURCE[1]="http://install.nitropdf.com/pro8/de/nitro_pro8_de.exe"
DL_ARCH[1]="X86"
DL_WINST_NAME[1]=Install32Exe
DL_WINST_NAME[1]=itWESS
DL_FILE[2]="nitro_pdf_professional_${VERSION}_x64.exe"
DL_SOURCE[2]="http://install.nitropdf.com/professional/de/nitro_pdf_professional7_de_x64.exe"
DL_FILE[2]="nitro_pro8_de_x64_${VERSION}.exe"
DL_SOURCE[2]="http://install.nitropdf.com/pro8/de/nitro_pro8_de_x64.exe"
DL_ARCH[2]="X86_64"
DL_WINST_NAME[2]=Install64Exe
DL_WINST_NAME[2]=itWESS64
# File array index for the image showing while installing the program
ICON_DL_INDEX=0
OPSI_INI_SECTION[0]="X86"
OPSI_INI_OPTION[0]="MsiId32"
OPSI_INI_VALUE[0]="{EF1DAEF3-C5EF-41E1-8F3A-A5F56B02F7B0}"
#OPSI_SECTION[1]="Package"
#OPSI_NAME[1]="MsiId"
#OPSI_ARCH[1]="X86"
#OPSI_VALUE[1]="{FFB6614F-6E61-4831-BF71-51633A718B18}"
OPSI_INI_SECTION[1]="X86_64"
OPSI_INI_OPTION[1]="MsiId64"
OPSI_INI_VALUE[1]="{3DD9E0A3-57DC-40D0-B54E-E30654CEABC8}"
WINST_NAME[0]="MsiId32"
WINST_VALUE[0]="{621187EC-4604-4E9F-AF67-659C6B19F6A7}"
WINST_NAME[1]="MsiId64"
WINST_VALUE[1]="{F2CD81BE-55B4-4DD0-8A80-25B4C4AAA1DE}"

View File

@@ -0,0 +1 @@
a568387ce2d04216c5631d21f4a8c9e946b5e81a /home/mario/.opsi-dist-cache/nitro.pdfpro-8//nitro7_200x175.gif

View File

@@ -1 +0,0 @@
16251aad1714a7e208b754c1df73e186c12ba536 /home/mario/.opsi-dist-cache/nitro.pdfpro-7.5.0.29/X86_64/nitro_pdf_professional_7.5.0.29_x64.exe

View File

@@ -1 +0,0 @@
d044636b95feca9c69b058820e6b667d9155c2f1 /home/mario/.opsi-dist-cache/nitro.pdfpro-7.5.0.29/X86/nitro_pdf_professional_7.5.0.29_x86.exe

View File

@@ -0,0 +1 @@
5e584f16f36caacd4df3f564e7e595d254914a6a /home/mario/.opsi-dist-cache/nitro.pdfpro-8.5.1.10/X86_64/nitro_pro8_de_x64_8.5.1.10.exe

View File

@@ -0,0 +1 @@
3d5ee2d715d0265fb7cd4e9cca48e412c19d37e7 /home/mario/.opsi-dist-cache/nitro.pdfpro-8.5.1.10/X86/nitro_pro8_de_x86_8.5.1.10.exe