PDFCreator auto update, removes old version but fails installing new
On 1/3 of my clients I am seeing a pattern with the auto update for PDFCreator:
The old version is removed, but the installation of the new version fails with error code 1. The log file will state that a reboot is needed, but that won't help.
It seems that there are some orphaned reg keys are left behind from the uninstall that is preventing the installation of the new version.
Removing the keys:
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v "PDFCreatorRestart" /f
REG DELETE "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce" /v "PDFCreatorRestart" /f
Will help reduce the amount of errors. Reduce, because still some clients really need a restart (Error code -355)
As reboot is out of the question for an auto update package, the only solution is to add an extra Auto deployment package that installs PDFcreator on all machines that is missing the software.
So maybe a good idea to create an extra step in the package to delete the keys?
And if somebody has an suggestion for the other error I am more then happy to try it out.
Comments
Hey Rudy!
We noticed strange behavior with the latest update of PDFCreator internally, which is why we added the uninstall step. In the past, when we've seen support tickets letting us know they were having issues with deploying PDFCreator a restart fixes most issues. In some cases, however, PDFCreator ends up with jobs stuck in the print spool and you'll need to clear those out as well.
If you're still having issues, feel free to contact us at support@pdq.com
The issue here is that PDFCreator installer is not built for upgrades. So before you install the new version, you have to uninstall the old one. The uninstallation process has since version 2.3 (I think) a problem with a the shell extension which it is not able to remove as its locked by explorer and possibly other tools. What id does, is that it schedules the dll removal for the reboot.
When the computer is rebooted, the DLL is removed and you can run the installer one more time, but this time successfully.
What I did not try yet is to kill explorer.exe before runnig the uninstaller.
This is a Batch I am using:
-----------------------------------------------------
@echo off
taskkill /im explorer.exe /f
@if exist "C:\Program files\PDFCreator\unins000.exe" "C:\Program files\PDFCreator\unins000.exe" /verysilent /norestart
@if exist "C:\Program files\PDFCreator\unins001.exe" "C:\Program files\PDFCreator\unins001.exe" /verysilent /norestart
@if exist "C:\Program files\PDFCreator\unins002.exe" "C:\Program files\PDFCreator\unins002.exe" /verysilent /norestart
@if exist "C:\Program files (x86)\PDFCreator\unins000.exe" "C:\Program files\PDFCreator\unins000.exe" /verysilent /norestart
@if exist "C:\Program files (x86)\PDFCreator\unins001.exe" "C:\Program files\PDFCreator\unins001.exe" /verysilent /norestart
@if exist "C:\Program files (x86)\PDFCreator\unins002.exe" "C:\Program files\PDFCreator\unins002.exe" /verysilent /norestart
rmdir C:\Program files\PDFCreator /s /q
if exist "C:\Program files (x86)\PDFCreator" rmdir "C:\Program files (x86)\PDFCreator" /s /q
PDFCreator-2_5_2-setup.exe /SP- /SILENT /NORESTART /LOADINF=".\pdfcreator.ini" /ForceInstall
reg add "HKLM\SOFTWARE\PDFCreator\Program" /v UpdateInterval /t REG_DWORD /d 00000000 /f
if exist "C:\Program files\PDFCreator\Toolbar" del "C:\Program files\PDFCreator\Toolbar" /F /S /Q
if exist "C:\Program files (x86)\PDFCreator\Toolbar" del "C:\Program files (x86)\PDFCreator\Toolbar" /F /S /Q
ping localhost > NUL
call #Update.cmd
start explorer.exe
-----------------------------------------------------
the #Update.cmd:
-----------------------------------------------------
@echo off
for /f %%i IN ('doff.exe yyyymmddhhmmss') DO SET TimeStamp=%%i
IF EXIST %WinDir%\Sysnative (
SET PScriptDLL=pscript5-x64.dll
SET DLLPath=%WINDIR%\Sysnative\spool\drivers\x64\3\
) ELSE (
SET PScriptDLL="pscript5-x86.dll"
SET DLLPath=%WINDIR%\System32\spool\drivers\W32X86\3\
)
IF EXIST %DLLPath% (
IF EXIST %DLLPath%pscript5.dll (
net stop spooler
rename %DLLPath%pscript5.dll pscript5.dll-%TimeStamp%.bak
copy %PScriptDLL% %DLLPath%pscript5.dll /Y
net start spooler
echo Update completed!
)
) ELSE (
echo Missing PDFCreator driver directory!
)
-----------------------------------------------------
The second batch replaces some buggy PS drivers which caused problems by generating garbled PDF files.