Added associations for Windows 8 and uninstall again
This commit is contained in:
parent
6a9120b0d0
commit
3970d575ca
|
@ -67,17 +67,19 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||
endif
|
||||
|
||||
comment "Close the UnInstall Browser Window"
|
||||
sleepSeconds 3
|
||||
killtask "iexplore.exe"
|
||||
killtask "iron.exe"
|
||||
killtask "firefox.exe"
|
||||
killtask "chrome.exe"
|
||||
killtask "opera.exe"
|
||||
killtask "OpenWIth.exe"
|
||||
|
||||
DosInAnIcon_taskkill
|
||||
|
||||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
[DosInAnIcon_taskkill]
|
||||
taskkill /F /IM openwith.exe
|
||||
taskkill /F /IM iexplore.exe
|
||||
taskkill /F /IM iron.exe
|
||||
taskkill /F /IM firefox.exe
|
||||
taskkill /F /IM chrome.exe
|
||||
taskkill /F /IM opera.exe
|
||||
|
||||
[Winbatch_uninstall_msi_old_32]
|
||||
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
|
|
|
@ -23,6 +23,9 @@ DefVar $OLD_VERSION$
|
|||
DefVar $OLD_CREATOR_TAG$
|
||||
DefVar $OLD_RELEASE$
|
||||
|
||||
DefVar $InstallDir$
|
||||
DefVar $ProgExe$
|
||||
|
||||
Set $INST_SystemType$ = GetSystemType
|
||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||
|
||||
|
@ -75,6 +78,12 @@ else
|
|||
Sub_check_exitcode
|
||||
Winbatch_install_32
|
||||
Sub_check_exitcode
|
||||
|
||||
comment create associations
|
||||
Set $InstallDir$ = $InstallDir32$
|
||||
Set $ProgExe$ = $Prog32$
|
||||
DosInAnIcon_install winst /Sysnative
|
||||
|
||||
comment "Copy files"
|
||||
Files_install_32 /32Bit
|
||||
comment "Patch Registry"
|
||||
|
@ -92,6 +101,12 @@ else
|
|||
Sub_check_exitcode
|
||||
Winbatch_install_64
|
||||
Sub_check_exitcode
|
||||
|
||||
comment create associations
|
||||
Set $InstallDir$ = $InstallDir32$
|
||||
Set $ProgExe$ = $Prog32$
|
||||
DosInAnIcon_install winst /Sysnative
|
||||
|
||||
comment "Copy files"
|
||||
Files_install_64 /64Bit
|
||||
comment "Patch Registry"
|
||||
|
@ -104,6 +119,43 @@ else
|
|||
|
||||
endif
|
||||
|
||||
[DosInAnIcon_install]
|
||||
@echo off
|
||||
If exist "%System%\defaultassociations.xml" (copy "%System%\defaultassociations.xml" "$LogDir$") ELSE (copy "%ScriptPath%\defaultassociations.xml" "$LogDir$")
|
||||
|
||||
rem Handling for X86 installation directory since Windows Vista
|
||||
SET InstallDir=$InstallDir$
|
||||
for /f "tokens=1-4 delims=\" %%a in ("$InstallDir$") do (
|
||||
set a=%%a
|
||||
set b=%%b
|
||||
set c=%%c
|
||||
set d=%%d
|
||||
)
|
||||
IF "%b%" == "Program Files (x86)" SET InstallDir=%a%^\Program Files ^^(x86^^)^\%c%^\%d%
|
||||
|
||||
SET Prog=$ProgExe$
|
||||
SET Prog=%Prog:~0,-4%
|
||||
SET SC=HKLM\Software\Classes
|
||||
SET Extn=.fdf-filetype.ico .pdf-filetype.ico
|
||||
|
||||
FOR %%j IN (%Extn%) DO (
|
||||
|
||||
FOR /F "tokens=1,2 delims=-" %%A IN ("%%j") DO (
|
||||
REG ADD %SC%\%%A /VE /D "NitroPDFReader%%A" /F
|
||||
REG ADD %SC%\NitroPDFReader%%A /VE /D "%%A NitroPDFReader" /F
|
||||
REG ADD %SC%\NitroPDFReader%%A\DefaultIcon /VE /D "$InstallDir$\%%B" /F
|
||||
REG ADD %SC%\NitroPDFReader%%A\shell\open\command /VE /D "\"%InstallDir%\%Prog%.exe\" \"%%1\"" /F
|
||||
copy "$LogDir$\defaultassociations.xml" "$LogDir$\defaultassociations.xml.old"
|
||||
xml ed -d /DefaultAssociations/Association[@Identifier='%%A'] "$LogDir$\defaultassociations.xml.old"> "$LogDir$\defaultassociations.xml"
|
||||
copy "$LogDir$\defaultassociations.xml" "$LogDir$\defaultassociations.xml.old"
|
||||
xml ed -s /DefaultAssociations -t elem -n Association_new -v "" -i /DefaultAssociations/Association_new -t attr -n Identifier -v %%A -i /DefaultAssociations/Association_new -t attr -n ProgId -v NitroPDFReader.Document.3 -i /DefaultAssociations/Association_new -t attr -n ApplicationName -v "Nitro Reader 3" -r "/DefaultAssociations/Association_new" -v Association "$LogDir$\defaultassociations.xml.old"> "$LogDir$\defaultassociations.xml"
|
||||
)
|
||||
)
|
||||
|
||||
rem Set Default Associations for Windows 8
|
||||
move "$LogDir$\defaultassociations.xml" "%System%"
|
||||
REG ADD HKLM\Software\Policies\Microsoft\Windows\System /V DefaultAssociationsConfiguration /D "%System%\defaultassociations.xml" /F
|
||||
|
||||
[DosInAnIcon_extract_32]
|
||||
copy /Y "$Install32Exe$" "$LogDir$\nitro-32.exe"
|
||||
"$LogDir$\nitro-32.exe" /EXTRACTMSI:$LogDir$\nitro-32.msi
|
||||
|
|
|
@ -41,3 +41,11 @@ OPSI_INI_VALUE[0]="{0EB8ACBE-C138-48F9-B032-8AA5BEA5E396}"
|
|||
OPSI_INI_SECTION[1]="X86_64"
|
||||
OPSI_INI_OPTION[1]="MsiId64"
|
||||
OPSI_INI_VALUE[1]="{1197549C-5221-4C9A-8182-E77D289734DA}"
|
||||
|
||||
OPSI_INI_SECTION[2]="X86"
|
||||
OPSI_INI_OPTION[2]="Prog32"
|
||||
OPSI_INI_VALUE[2]="NitroPDFReader.exe"
|
||||
|
||||
OPSI_INI_SECTION[3]="X86_64"
|
||||
OPSI_INI_OPTION[3]="Prog64"
|
||||
OPSI_INI_VALUE[3]="NitroPDFReader.exe"
|
||||
|
|
Loading…
Reference in New Issue