Difference between revisions of "PDFCreator"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Questions)
m (fix 0.9.3 remove)
Line 39: Line 39:
 
       <install cmd='msiexec /qn /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
 
       <install cmd='msiexec /qn /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
 
       <upgrade cmd='msiexec /qn /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
 
       <upgrade cmd='msiexec /qn /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
       <remove cmd='msiexec /qn /x %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />  
+
       <remove cmd='msiexec /qn /x %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />  
 +
      <remove cmd='regedit /S %SOFTWARE%\pdfcreator\pdfc_del.reg' /> <!-- It seems uninstall does not properly clean up.
 +
(Specifically pdfcmnnt.dll is not removed and is still being loaded on boot) This is a problem when upgrading from 0.9.3 to 0.9.5,
 +
because the 0.9.5 installer cannot handle locked files during silent install. -->
 
  </package>
 
  </package>
 
</source>
 
</source>
 +
 +
The reg file is:
 +
<pre>
 +
Windows Registry Editor Version 5.00
 +
 +
[-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Monitors\PDFCreator]
 +
[-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Print\Monitors\PDFCreator]
 +
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\PDFCreator]
 +
</pre>
  
 
=== Upgrading to 0.9.3 from an already installed older release (0.8.1 in my case) ===
 
=== Upgrading to 0.9.3 from an already installed older release (0.8.1 in my case) ===

Revision as of 01:10, 24 August 2008

PDFCreator 0.9.5

PDFCreator 0.9.5 is not available as an MSI package. Customization has to be prepared via a .inf file produced by the installation package with the /SAVEINF="filename.inf" option; this allows for example the installation without toolbar. Version 0.9.5 does not upgrade from 0.9.3 so I use a different package id ("pdfcreator" for the old version, "pdfcreator-095" for the new), so that the old version is removed before the new is installed.

Note that the uninstall string is "PDFCreator" for both versions, so I added a check on the executable version number just to make sure.

 <package
       id="pdfcreator-095"
       name="PDFCreator 0.9.5"
       revision="1"
       reboot="false"
       priority="0">
       <check type="logical" condition="and">
         <check type="uninstall" condition="exists" path="PDFCreator" />
         <check type="file" condition="versionequalto" path="%PROGRAMFILES%\PDFCreator\PDFCreator.exe" value="0.9.0.5"/>
       </check>
       <install cmd='%SOFTWARE%\PDFCreator\PDFCreator-0_9_5_setup.exe /LOADINF="%SOFTWARE%\PDFCreator\PDFCreator-0_9_5_setup.inf" /VERYSILENT /NORESTART /SP-' />
       <upgrade cmd='%SOFTWARE%\PDFCreator\PDFCreator-0_9_5_setup.exe /LOADINF="%SOFTWARE%\PDFCreator\PDFCreator-0_9_5_setup.inf" /VERYSILENT /NORESTART /SP-' />
       <remove  cmd='%PROGRAMFILES%\PDFCreator\unins000.exe /VERYSILENT' />   
 </package>


PDFCreator 0.9.3

PDFCreator 0.9.3 is available as an MSI package. Using the standard MSI install/uninstall seems to work for me.

 <package
       id="pdfcreator"
       name="PDFCreator"
       revision="1"
       reboot="false"
       priority="0">
       <check type="uninstall" condition="exists" path="PDFCreator" />   
       <install cmd='msiexec /qn /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
       <upgrade cmd='msiexec /qn /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
       <remove cmd='msiexec /qn /x %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' /> 
       <remove cmd='regedit /S %SOFTWARE%\pdfcreator\pdfc_del.reg' /> <!-- It seems uninstall does not properly clean up.
 (Specifically pdfcmnnt.dll is not removed and is still being loaded on boot) This is a problem when upgrading from 0.9.3 to 0.9.5,
 because the 0.9.5 installer cannot handle locked files during silent install. -->
 </package>

The reg file is:

Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Print\Monitors\PDFCreator]
[-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Print\Monitors\PDFCreator]
[-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\PDFCreator]

Upgrading to 0.9.3 from an already installed older release (0.8.1 in my case)

The previous package block works when 0.9.3 is the first release to be installed. The package block below resolves 2 problems.

<package
       id="pdfcreator"
       name="PDFCreator"
       revision="6"
       reboot="false"
       priority="0">
       <check type="uninstall" condition="exists" path="PDFCreator" />   
       <install cmd='msiexec /qn /norestart /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
	<install cmd='regedit /s %SOFTWARE%\pdfcreator\HKLM_pdfcreator_command.reg' />
       <upgrade cmd='msiexec /qn /norestart /i %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />
	<upgrade cmd='regedit /s %SOFTWARE%\pdfcreator\HKLM_pdfcreator_command.reg' />
       <remove cmd='msiexec /qn /x %SOFTWARE%\pdfcreator\zPDFCreator-0_9_3-AD_DeploymentPackage-WithoutToolbar.msi' />   
 </package>

The reg file is :

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\PDFCreator\Ports\PDFCreator:]
"Command"="C:\\Program Files\\PDFCreator\\PDFSpooler.exe"

There is a last bug to solve. I'll post the solution here later.

PDFCreator 0.9.1

PDFCreator 0.9.1 comes in the handy form of a MSI package.
Unfortunately, when you install it, it is possible that a normal user will not be able to use this printer - this has to be corrected with rundll printui.dll,PrintUIEntry.... The complete silent installer and uninstaller looks like this:

 <package
        id="pdfcreator"
        name="PDFCreator"
        revision="1"
        reboot="false"
        priority="0">
        <check type="uninstall" condition="exists" path="PDFCreator" />   
        <install cmd='msiexec /qb /i "%SOFTWARE%\PDFCreator\PDFCreator-0_9_1_AFPLGhostscript_32bit.msi"' />
        <install cmd='rundll32 printui.dll,PrintUIEntry /q /ga pdfcreator' />
        <remove cmd='MsiExec.exe /q /x{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}' />   
 </package>

Note: while I was testing this, I installed and uninstalled PDFCreator 0.9.1 without rebooting the PC. After yet another installation, the installer popped up a window, saying that a restart is necessary. So perhaps if you're upgrading from the older PDFCreator version, a restart after uninstalling that old version might be a good idea.

Options

Questions

  • How do you prevent installing the browser toolbar?

There is a way to prevent installing the toolbar when installing with the Inno Setup based .exe. Just use /components="program,ghostscript,languages,languages\english". These will install only these ones. But on sourceforge, an MSI package of 0.9.3 without toolbar is available.

Older PDFCreator versions

Do a manual installation of PDFCreator using the dos shell:

PDFCreator-0_8_0_GNUGhostscript.exe /SAVEINF="pdfcreator-0.8.0.inf"

Use the inf-file for the installer:

 <package
        id="pdfcreator-0.8.0"
        name="PDF Creator 0.8.0"
        revision="1"
        reboot="true"
        priority="1000">
        <check type="uninstall" condition="exists" path="PDFCreator 0.8.0" />
        <install cmd='%SOFTWARE%\pdfcreator\PDFCreator-0_8_0_GNUGhostscript.exe /LOADINF="%SOFTWARE%\pdfcreator\pdfcreator-0.8.0.inf" /VERYSILENT /NORESTART /SP-' />
        <remove cmd='"%ProgramFiles%\PDFCreator\unins000.exe" /VERYSILENT' />
 </package>
  • Watch out to really use the /NORESTART parameter in the install. If you don't this will happen: the installer will restart the machine, but wpkg doesn't have time to make a note about the successful installation, on reboot wpkg will try and reinstall the package, but skip because it finds "PDFCreator 0.8.0" in the uninstall folder. PDFCreator has been installed, but the user will always be nagged by the wpkg notification after a reboot.
  • Using the environment variable %ProgramFiles% keeps your uninstall independent of the windows language version. Watch out to also remove the Path="c:\somepath" entry in the inf-file if you want a truly language-independent installation.
  • There is also a patch for this version of PDFCreator. Because it produces the same uninstall entry as this version, i.e. "PDFCreator 0.8.0" I have not yet found a way to successfully add it as an additional package. - Now I have, see next section.

Installing 0.8.0-patch2

Create the inf file with the new version in the same way as above. Create the package:

<package
        id="pdfcreator-0.8.0-patch2"
        name="PDF Creator 0.8.0"
        revision="1"
        reboot="true"
        execute="once"
        priority="999">
        <install cmd='%SOFTWARE%\ ... (nearly same as above) ...' />
        <remove cmd='"%ProgramFiles%\PDFCreator\unins000.exe" /VERYSILENT' />
</package>

Main difference: I've set down the priority, so 0.8.0 is always installed before patch2 and I've also removed the install check. But it doesn't stop here. Next, create a profile:

<profile id="pdfcreator">
<package package-id="pdfcreator-0.8.0" />
<package package-id="pdfcreator-0.8.0-patch2" />
</profile>

Now, whenever you want to include pdfcreator, you can just include the "software profile" in any other profiles. Having both versions in a profile and using the priority settings ensures that 0.8.0 is always installed before patch2.