/build/static/layout/Breadcrumb_cap_w.png

Acro Software CutePDF Writer

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login
Views: 29.5k  |  Created: 08/13/2005

Average Rating: 0
CutePDF Writer has 1 inventory records, 7 Questions, 0 Blogs and 1 links. Please help add to this by sharing more!

Deployment Tips (22)

Most Common Setup Type
Legacy Setup with command line support
Average Package Difficulty Rating
Rated 4 / 5 (Somewhat Difficult) based on 7 ratings
Most Commonly Reported Deployment Method
Repackaged (to a legacy setup.exe)
124
Note
CutePDF Writer 2.3 is a freely available PDF creation utility. You can download it from http://www.cutepdf.com.

It requires two downloads. The first download is the CuteWriter.exe which sets up a PostScript print queue on the machine. The second download is GhostScript which is already available as an MSI. Check the AppDeploy.com package entry for GhostScript.

It's not hard to set up your own MSI package for the Writer portion. You will need the following files and registry keys/subkeys from a reference machine:

Files
C:\Windows\System32\cpwsave.exe
C:\Windows\System32\cpwmon2k.dll
C:\Program Files\Acro Software\PDFWrite.rsp
C:\Program Files\Acro Software\README.htm
C:\Windows\System32\spool\drivers\w32x86\cutepdfw.ppd
C:\Windows\System32\spool\drivers\w32x86\ps5ui.dll
C:\Windows\System32\spool\drivers\w32x86\pscript.hlp
C:\Windows\System32\spool\drivers\w32x86\pscript.ntf
C:\Windows\System32\spool\drivers\w32x86\pscript5.dll
C:\Windows\System32\spool\drivers\w32x86\3\cutepdfw.ppd
C:\Windows\System32\spool\drivers\w32x86\3\cutepdfw.bpd

Registry Keys and Subkeys/Values
"HKLM\Software\Acro Software Inc"
"HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\CutePDF Writer"
"HKLM\System\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers\Version-3\CutePDF Writer"
"HKLM\System\CurrentControlSet\Control\Print\Monitors\CutePDF Writer Monitor"
"HKLM\System\CurrentControlSet\Control\Print\Printers\CutePDF Writer"

You will need to replace any machine name you see with the [ComputerName] MSI property in the "DsSpooler" subkeys.

Also, you will want to add "Spooler" to the ServiceControl table so that the Spooler service is stopped prior to install and restarted after the install.

A good explanation of the pitfalls of using WinInstall LE to create the package is written up in the forum by member, goodsnapper, on April 12, 2005.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
123
Command Line

Using WPS v7.0 I followed the steps detailed above by jphillips, BEPhipps, xltel. I was still getting an dialogue box at the end of the install generated by the rundll32 exe - even though the install worked fine and CutePDF operated just as in a manual install! I got round this by adding the /q switch to the command detailed in BEPhipp's step 8.

Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
122
Note
There are a number of issues with using a repackager to install a print queue, so here was the solution that I have implemented, which you can either integrate into a RIS install or develop an msi to install.

1. Download CuteWriter from www.cutepdf.com.

2. Start the installation to unpack the zipped files.

3. Copy the source files from your temp folder, before the installation.

4. Copy cpwmon2k.dll and cpwsave.exe to %systemroot%\system32.

5. Create the following registry entries.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\CutePDF Writer Monitor]
"Driver"="cpwmon2k.dll"
"CPW2:"="CutePDF Writer"

6. Restart the spool service

NET STOP SPOOLER
NET START SPOOLER

7. Using notepad create a file called cutepdf.inf and add the following entries. This will enable you install the printer via either the command line or the Add/Remote Printer Wizard. Save the file to the 'Driver' folder which was unpacked earlier.

[Version]
Signature="$Windows NT$"
Provider="CutePDF"
ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
Class=Printer

[PortMonitors]
"CutePDF Writer Monitor" = CutePDFWriterMonitor

[CutePDFWriterMonitor]
CopyFiles = @CPWMON2K.DLL
PortMonitorDll = CPWMON2K.DLL

[Manufacturer]
"CutePDF"

[CutePDF]
"CutePDF Writer" = CUTEPDF.PPD, Cute_PDF_Writer

[CUTEPDF.PPD]
CopyFiles=@CUTEPDFW.PPD,PSCRIPT
DataSection=PSCRIPT_DATA
DataFile=CUTEPDFW.PPD

[PSCRIPT]
PSCRIPT5.DLL
PS5UI.DLL
PSCRIPT.HLP
PSCRIPT.NTF

[PSCRIPT_DATA]
DriverFile=PSCRIPT5.DLL
ConfigFile=PS5UI.DLL
HelpFile=PSCRIPT.HLP

[DestinationDirs]
DefaultDestDir=66000

[SourceDisksNames.x86]
1 = "CutePDF",,,""

[SourceDisksFiles]
CPWMON2K.DLL = 1
CUTEPDFW.PPD = 1
PS5UI.DLL = 1
PSCRIPT.HLP = 1
PSCRIPT.NTF = 1
PSCRIPT5.DLL = 1

8. Run the following command to automatically install the print queue. The /b parameter can be changed to provide the print queue with a name of your choice. The /f parameter can be configured with a full pathname to the .inf file if the command is run from another directory.

rundll32 printui.dll,PrintUIEntry /if /b "CutePDF Writer" /f cutepdf.inf /r "CPW2:" /m "CutePDF Writer"

Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
121
Note
This was performed with version 2.7 of the free writer

First Download the current version of Ghost Script from http://sourceforge.net/projects/ghostscript/ as the standard one you download from cutepdf is now 4 years old. At time of writing 8.61 is available for windows. Goto link below for the most recent version.

http://sourceforge.net/project/showfiles.php?group_id=1897&package_id=108733

You can silently install with the following
setupgs.exe "%ProgramFiles%\gs".

Now download cutewriter.exe. When this application begins the installation it extras file to your temp folder in C:\documents and settings\usernameEither you have to be quick and copy the files out or use sysinternals Process Explorer to suspend the install while you copy the files.

This will provide you among others with setup32.exe and the annoying HTML file that loads at the end of their silent install. Delete the HTML file and then run this setup32.exe with the following and you have a silent install for cutePDF

setup32.exe /cpw12112006

This is what the application is loaded with by the installer to make it silent.

This will now install silently without the need for closing the html window.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
120
Note
I packaged CutePDF Writer 2.6 as follows.

(1) I Downloaded GPL Ghostscript 8.15 via the Acro Software site http://www.cutepdf.com/download/converter.exe and repackaged it using Macrovision Adminstudio in snapshot mode eliminating any obvious rubbish.

Please note that GPL Ghostscript is very different to AFPL Ghostscript in both its licence and program. GPL Ghostscript is the version recommended by Acro Software.

I found that repackaging GPL Ghostscript as an MSI was much easier than attemting to use the native MSI AFPL Ghostscript mentioned earlier. The AFPL version seemed to work okay but only produced 0 byte outputs which are unreadable via Adobe Reader. I am sure that the native MSI AFPL version can be made to work but in my case it did not.

(2) I then downloaded Acro CutePDF Writer 2.6 from
http://www.cutepdf.com/download/CuteWriter.exe and repackaged it using Macrovision Adminstudio in snapshot mode, again eliminating any obvious rubbish.

The result was that it just worked! A reboot was required for the CutePDF printer to be available to end users though. The reboot is not a problem to me at the moment though although it will be be in the future. I believe that this problem is associated with the printer spooler issues mentioned previously and that I will be able to work around this via my deployment mechanism which is Microsofts SMS 2003.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
116
Note
I created a MSI using the above notes by jphillips and BEPhipps and it worked perfect.

The only thing I noticed was the install puts PSCRIPT.HLP in the folder C:\Windows\System32\spool\drivers\w32x86\3\ so I left it there and made the following additions and changes to the INF file shown below;

[SourceDisksNames.x86]
' added the following entry
2 = "CutePDF3",PSCRIPT.HLP,,3,""

[SourceDisksFiles]
' Changed the following entry from 1 to 2
PSCRIPT.HLP = 2

The rundll32 command line was added at the end of the MSI after InstallFinalize.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
116
Note
I installed CutePDF with Group Policy and a dos start up script.

You can unzip Ghostwriter and run the setup.exe from bat file without any problems.

Run the CuteWriter xxx.exe with a /silent switch. It's not exactly what I would call silent but at least no user interaction is required.

The final bit is to add a "killtask /IM iexplore.exe" and "killtask /IM firefox.exe" at the end of the script after forcing a 3 seconds delay.

I think CutePDF is a fantastic product. Well worth the money ;) but why does it insist on opening a it's homepage after an install?
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
116
Note
I followed rodt99 and called
cutewriter.exe /silent

The IE window that comes up at the end is just an advert for the professional version. File save dialogs when printing to PDF also have a similar "why not upgrade" message.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
116
Note
A cleaner way to get rid of the browser popup advert is to use the following taskkill command:

taskkill /FI "WINDOWTITLE eq CutePDF*"

This will leave all existing Explorer/Firefox windows open & only close the popup.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
31
Command Line
Here are the install options to silent install CutePDF Writer 2.8, without the ask toolbar and without opening the CutePDF Writer Read Me.html at the end of setup.

Download free PS2PDF converter
http://cuteaccess.com/download/GPLGS.exe

Download CutePDF Writer
http://acrosoftware.com/download/CuteWriter.exe

REM auto install GPL Ghostscript PS2PDF converter (required by CutePDF Writer)
"C:\Software\CutePDF Writer\2.8\GPLGS.exe" /auto

Rem install cutepdf writer, silent install, no ask toolbar and does not open CutePDF Writer readme.html
"C:\Software\CutePDF Writer\2.8\CuteWriter.exe" /verysilent /no3d
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
12
Note
Explanation:
-Install GS GhostScript support files
-Install CutePDF (with AskToolbar)
-Deletes all shortcuts
-removes AskToolbar
-------------------------
Script Body:

setupgs.exe "%programfiles%\gs"
cutewriter.exe /verysilent
del "C:\Documents and Settings\All Users\Start Menu\Programs\Ghostscript\*.*" /Q
del "C:\Documents and Settings\All Users\Start Menu\Programs\CutePDF\PDF Writer\*.*" /Q
rd "C:\Documents and Settings\All Users\Start Menu\Programs\Ghostscript"
rd "C:\Documents and Settings\All Users\Start Menu\Programs\CutePDF\PDF Writer"
rd "C:\Documents and Settings\All Users\Start Menu\Programs\CutePDF\"
MsiExec.exe /x{86D4B82A-ABED-442A-BE86-96357B70F4FE} /qn
-----------------------


Explanation:
-Uninstalls CutePDF
-Uninstall GS
-----------------------
Script Body:

"C:\Program Files\Acro Software\CutePDF Writer\uninscpw.exe" -s
"C:\Program Files\gs\uninstgs.exe" "C:\Program Files\gs\gs8.64\uninstal.txt" -q
-----------------------
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
11
Note
To install silently and prevent the README.HTM file from displaying after install, try installing CuteWriter.exe with the /verysilent switch.

cutewriter.exe /verysilent
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
9
Note
I had issues with all of the solutions that have been posted so far:
1. Uninstalling ask.com after the fact doesn't revert the home page.
2. I wanted to install GhostScript separately so I have the current version.
3. There's an undocumented switch (/vs) that avoids the final browser popup.

Here is the process I put together. I happen to use ZENworks and created two simple app objects.

GhostScript install:
1. Download the latest version from http://sourceforge.net/projects/ghostscript/
2. Use UniExtract to extract the setup files, which includes setupgs.exe
3. Command line: setupgs.exe "%*ProgramFiles%\ghostscript"

CutePDF
1. Download the CutePDF installer (cutewriter.exe)
2. Use UniExtract to extract the setup files. They will be in a folder called "{tmp}".
3. Assuming you want the 32-bit version, copy the following folder and files to another location:
\Driver\ (you can omit the x64 folder)
PDFWrite.rsp
Setup.exe
UNINSCPW.exe
WizModernSmallImage-IS.bmp
cpwmon2k.dll
CPWSave.exe
4. Install command line: "setup.exe /cpw07012009 /w1 /vs"

Result: No prompts, no popup, no Ask.com

I don't know if the /cpw* parameter changes with versions. If this command line doesn't work for you, you can find the right parameter as follows:

1. Download the latest ProcMon from http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
2. Launch ProcMon, then launch the original cutewriter.exe and complete the installation.
4. In the ProcMon log, use Ctrl-F to Find /cpw (or create a filter for "Detail Contains /cpw"). Look in the Detail field to get the actual parameter and substitute in the command line.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
6
Command Line
:: Install pdf writer

@echo off
set ghostlocal=C:\Program Files\GPLGS
set ghostremote=\\appserver.dom.loc\installs\gs815w32\Setup.exe
set pdflocal=C:\Program Files\Acro Software\CutePDF Writer
set pdfremote=\\appserver.dom.loc\installs\CuteWriter2.7.exe


:: -------------------
:: install ghostwriter
:: -------------------

:: test if ghostlocal exists
if exist "%ghostlocal%" goto l-ghost-end

:: test if ghostremote exists
if not exist "%ghostremote%" goto l-ghost-end

:: install ghost writer
%ghostremote%

:l-ghost-end


:: ------------------
:: install pdf writer
:: ------------------

:: test if pdflocal exists
if exist "%pdflocal%" goto l-pdf-end

:: test if pdfremote exists
if not exist "%pdfremote%" goto l-pdf-end

:: install pdf writer
%pdfremote% /silent

:: wait for install to finish
ping -n 5 1.1.1.1

:: now kill any browser advert/pop-up
taskkill /IM iexplore.exe
taskkill /IM firefox.exe

:l-pdf-end


:end

@echo on
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
3
Note
The entry by turbokitty is good, but the problem I found was that the ASK toolbar changes the homepage and the default search provider when it installs. It does not seem to set this back when you uninstall. So, to get around that, I ended up needing to extract the CutePDF install. You do this by running the install without having Ghostscript installed. Then browse to the temp folder and find the subfolder CutePDF created. Copy all of the files out of there and put them into a new "CutePDF" folder. Delete the ASK toolbar files, and the readme.htm file. When you run the install, use the following command "Setup.exe /cpw07012009 /W1". I then took the ghostscript files and extracted them into a GS folder. I then made a vbscript to run the installs and do the cleanup. I then packaged it into a self extracting 7zip installer. Now I have a silent Ghostscript and CutePDF installer with no popups.

'Declare scripting objects
Set oNet = WScript.CreateObject("WScript.Network")
Set oShell = WScript.CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

'Declare Environment variables
eAllUsersProfile = oShell.ExpandEnvironmentStrings("%AllUsersProfile%")
eUserProfile = oShell.ExpandEnvironmentStrings("%UserProfile%")
eProgramFiles = oShell.ExpandEnvironmentStrings("%ProgramFiles%")

'Declare Special Folder Variables
Set oSpecFolders = oShell.SpecialFolders
Dim eAllUsersDesktop, eAllUsersStartMenu, eAllUsersPrograms, eAllUsersStartup, eDesktop, eFavorites, eFonts, _
eMyDocuments, eNetHood, ePrintHood, ePrograms, eRecent, eSendTo, eStartMenu, eStartup, eTemplates

'Create the Special Folders Variables
eAllUsersPrograms = oSpecFolders("AllUsersPrograms") 'C:\Documents and Settings\All Users\Start Menu\Programs

oShell.CurrentDirectory = GetScriptPath & "\GS"
oShell.Run """" & GetScriptPath & "\GS\setupgs.exe"" ""%programfiles%\GPLGS""", 0, True
oShell.CurrentDirectory = GetScriptPath & "\CutePDF"
oShell.Run """" & GetScriptPath & "\CutePDF\Setup.exe"" /cpw07012009 /W1", 0, True

If oFSO.FolderExists(eAllUsersPrograms & "\GhostScript") = true Then oFSO.DeleteFolder(eAllUsersPrograms & "\GhostScript"), force
If oFSO.FolderExists(eAllUsersPrograms & "\CutePDF\PDF Writer") = true Then oFSO.DeleteFolder(eAllUsersPrograms & "\CutePDF\PDF Writer"), force
If oFSO.FolderExists(eAllUsersPrograms & "\CutePDF") = true Then oFSO.DeleteFolder(eAllUsersPrograms & "\CutePDF"), force

Function GetScriptPath
' Return path to the current script
DIM path
path = WScript.ScriptFullName ' script file name
GetScriptPath = Left(path, InstrRev(path, "\"))
End Function
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
1
Note
1.Install GPL Ghostscript Writer

unzip the converter.exe with winzip. You will get a bunch of files and a setup.exe

Silent install: setup.exe

2: Install CuteWriter

Silent Install:CuteWriter.exe /verysilent

3: Some version of Cutpdf contain the ugly Ask toolbar. You may want to remove it after the install. find the related GUID youself.

MsiExec.exe /X {XXXXXXXXXXXXXXXXXXXXXX} /qn /norestart
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
1
Command Line
I created a task sequence in SCCM 2007 to run the following command line:

"cmd /c cutewriter.exe /verysilent & msiexec.exe /q /x {86D4B82A-ABED-442A-BE86-96357B70F4FE}"

This installed CutePDF then immediately uninstalled the ASK.com garbage. The end result was a working version of CutePDF without the toolbar and home page change to my browser. I grew tired of fighting with the msi package.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Note
I found a post on the message boards that helped me capture the install with Wise Package Studio.

http://www.appdeploy.com/messageboards/tm.asp?m=16527, Post #11 by solsikkehaven

There are two important aspects of what he did:

1. Run Setup Capture with Hardware Detection on. It is important to use hardware detection, otherwise your capture will not see the virtual printer.

2. Add a Service Control to the MSI - Start,Stop the SPOOLER service. This reloads the Windows printer objects.

I followed his instructions and wound up with a working .MSI.

Thank you solsikkehaven
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Command Line

Easy silent install:

CuteWriter.exe /verysilent /no3d

The "no3d" command prevents installation of Ask toolbar and homepage, etc.

Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Command Line
SCCM 2007 - Create a Pacakge as normal and for the setup command line create an "install.cmd" with the following within:

"%~dp0GPLGS.exe" /auto
"%~dp0CuteWriter.exe" /verysilent /no3d
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
0
Note

Version 3.0 under Windows 7 x64 SP1

- download from http://www.cutepdf.com/products/cutepdf/writer.asp

- Extract contense of converter.exe with 7Zip

- Create script (example in CMD, %~DP0 = current folder):

Echo Off

::Install
"%~DP0Setup.exe"
"%~DP0cutewriter.exe" /verysilent


::CleanUp
Rd "%ALLUSERSPROFILE%\Start Menu\Programs\Ghostscript" /S /Q
Rd "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\CutePDF" /S /Q

MsiExec.exe /x{86D4B82A-ABED-442A-BE86-96357B70F4FE} /qn

::Pause

- Test PDF printer

 

Setup Information:
Setup Type: Legacy Setup with command line support
Deployment Method Used: unspecified
Deployment Difficulty: Very Easy
Platform(s): Windows
0
Script
Automating CutePDF Writer repackaging to MSI (without Ask and popups). This method will create am msi that installs CutePDF Writer silently, without Ask Toolbar, and avoids popups (both asking to install GhostScript, and the final Readme). To prevent the GhostScript warning, it checks for the GhostScript presence before trying to run the Setup.exe, and if GhostScript isn't found, the setup fails (avoiding popup dialog that would hang the AD deployment). It doesn't need to reboot after installation, and it is able to install both 32-bit and 64-bit driver files, because it uses the original Setup.exe internally. Prerequisites: 1. Windows Installer XML (WiX) toolset (http://wix.sourceforge.net/) 2. Inno Setup Unpacker (http://innounp.sourceforge.net/) (this is the tool that is used by Universal Extractor behind the scenes) 3. 7-zip (http://7-zip.org/) 4. 7-zip 7z Library, SFXs for installers, Plugin for FAR Manager package (http://7-zip.org/) Steps: 1. Create a working directory (e.g., c:\cutemsi) 2. Download CutePDFWriter installer (CuteWriter.exe) from http://www.cutepdf.com/ into this directory. 3. Copy 7-zip small sfx module (7zS2.sfx) to this directory 4. Create this VBScript file and name it "util.vbs": Option Explicit Const HKEY_LOCAL_MACHINE = &H80000002 Function GetRegObj(regType) Dim oCtx, oLocator Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet") oCtx.Add "__ProviderArchitecture", regType Set oLocator = CreateObject("Wbemscripting.SWbemLocator") Set GetRegObj = oLocator.ConnectServer("", "root\default", "", "", , , , oCtx).Get("StdRegProv") End Function Function EnumRegKeys(regObj, rootKey, key) Dim oReg, oInParams, oOutParams Set oInParams = regObj.Methods_("EnumKey").InParameters oInParams.hDefKey = rootKey oInParams.sSubKeyName = key Set oOutParams = regObj.ExecMethod_("EnumKey", oInParams) EnumRegKeys = oOutParams.sNames End Function Function ReadRegStr(regObj, rootKey, key, value) Dim oReg, oInParams, oOutParams Set oInParams = regObj.Methods_("GetStringValue").InParameters oInParams.hDefKey = rootKey oInParams.sSubKeyName = key oInParams.sValueName = value Set oOutParams = regObj.ExecMethod_("GetStringValue", oInParams) ReadRegStr = oOutParams.sValue End Function Function ProcessGSKey(key) Dim objReg, objFS, arrSubKeys, subkey, GS_DLL_path, gsDir Set objReg = GetRegObj(32) Set objFS = CreateObject("Scripting.FileSystemObject") arrSubKeys = EnumRegKeys(objReg, HKEY_LOCAL_MACHINE, key) If IsArray(arrSubKeys) Then ' It's only IsArray if there's no error For Each subkey In arrSubKeys GS_DLL_path = ReadRegStr(objReg, HKEY_LOCAL_MACHINE, key & "\" & subkey, "GS_DLL") gsDir = objFS.GetParentFolderName(GS_DLL_path) if (objFS.FileExists(objFS.BuildPath(gsDir, "gswin32c.exe"))) Then ProcessGSKey = True ' Return success Exit Function End If Next End If ProcessGSKey = False Exit Function End Function Sub CheckGSInstalled() Dim regKeys(2), key regKeys(0) = "SOFTWARE\GPL Ghostscript" regKeys(1) = "SOFTWARE\AFPL Ghostscript" regKeys(2) = "SOFTWARE\GNU Ghostscript" For Each key In regKeys If (ProcessGSKey(key)) Then Session.Property("GhostScriptInstalled") = "1" Exit For End If Next End Sub 5. Create this WIX source file and name it "CuteWriter.wxs": <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" Name="CutePDFWriterInstall" Language="1033" Version="1.0.0.0" Manufacturer="CutePDFWriterInstall" UpgradeCode="43A0F383-1BD7-46C6-B2B2-B814E6CF7681"> <Package InstallerVersion="200" Compressed="yes" /> <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Component Id="RegisterProduct" Guid="*"> <RegistryKey Root="HKLM" Key="SOFTWARE\CutePDFWriterInstallWrapper" Action="createAndRemoveOnUninstall"> <RegistryValue Name="Installed" Type="integer" Value="1" KeyPath="yes"/> </RegistryKey> </Component> </Directory> <Feature Id="All" Level="1"> <ComponentRef Id="RegisterProduct"/> </Feature> <Binary Id="util.vbs" SourceFile="util.vbs"/> <CustomAction Id="CheckGSInstalled" BinaryKey="util.vbs" VBScriptCall="CheckGSInstalled" Return="ignore"/> <CustomAction Id="NoGS" Error="0"/> <Binary Id="CPWSetup" SourceFile="CPWSetup.exe"/> <CustomAction Id="CPWSetup" BinaryKey="CPWSetup" ExeCommand="/cpw07012009 /W1 /vs" Execute="deferred" Impersonate="no"/> <InstallExecuteSequence> <Custom Action="CheckGSInstalled" Before="CostInitialize">NOT Installed</Custom> <Custom Action="NoGS" After="CheckGSInstalled">(NOT Installed) AND (NOT GhostScriptInstalled)</Custom> <Custom Action="CPWSetup" After="InstallInitialize">NOT Installed</Custom> </InstallExecuteSequence> <UI> <Error Id="0">Prerequisite check failed: GhostScript not found!</Error> <ProgressText Action="CheckGSInstalled">Checking if GhostScript is installed...</ProgressText> <ProgressText Action="CPWSetup">Installing CutePDW Writer...</ProgressText> </UI> </Product> </Wix> 6. Create this batch file (making sure that paths to Inno Setup Unpacker, 7-zip and WIX are correct) and name it "repack.bat": rmdir /S /Q bin rmdir /S /Q obj del CPWSetup.exe mkdir obj innounp.exe -x -b -q -dobj\{tmp} -c{tmp} CuteWriter.exe 7z.exe a obj\{tmp}.7z .\obj\{tmp}\* -x!Apn* -x!Ask* copy /b 7zS2.sfx + obj\{tmp}.7z CPWSetup.exe "%WIX%bin\candle.exe" -nologo CuteWriter.wxs -out obj\CuteWriter.wixobj "%WIX%bin\light.exe" -nologo -sw1079 obj\CuteWriter.wixobj -out bin\CuteWriter.msi Run repack.bat, and it will make msi in the bin subdirectory. Shortcomings: 1. Creates an extra entry in Windows Add/Remove Programs 2. Unable to uninstall CutePDF Writer. This is due to the fact that CutePDF Writer uses different techniques on 32-bit and 64-bit systems: on 32-bit, it uses UNINSCPW.exe that can be used silently (-s), and on 64-bit it uses Setup64.exe /uninstall, and it is unable (?) to be run silently. One could copy the 32-bit UNINSCPW.exe to the 64-bit installation directory and run it, and it would (almost completely) remove the program (including printer and port), but it will leave Setup64.exe and Add/Remove registry key.
Setup Information:
Setup Type: unspecified
Deployment Method Used: unspecified
Deployment Difficulty: unspecified
Platform(s): Windows
  • The XML tags containing angle brackets < were removed from the previous post. :( - mikekaganski 12 years ago
  • This is the text of CuteWriter.wxs:

    <?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="CutePDFWriterInstall" Language="1033" Version="1.0.0.0" Manufacturer="CutePDFWriterInstall" UpgradeCode="43A0F383-1BD7-46C6-B2B2-B814E6CF7681">
    <Package InstallerVersion="200"/>

    <Directory Id="TARGETDIR" Name="SourceDir">
    <Component Id="RegisterProduct" Guid="*">
    <RegistryValue Root="HKLM" Key="SOFTWARE\CutePDFWriterInstallWrapper" Name="Installed" Type="integer" Value="1" KeyPath="yes"/>
    </Component>
    </Directory>

    <Feature Id="All" Level="1">
    <ComponentRef Id="RegisterProduct"/>
    </Feature>

    <Binary Id="util" SourceFile="util.vbs"/>
    <CustomAction Id="CheckGSInstalled" BinaryKey="util" VBScriptCall="CheckGSInstalled" Return="ignore"/>
    <CustomAction Id="NoGS" Error="0"/>

    <Binary Id="CPWSetup" SourceFile="CPWSetup.exe"/>
    <CustomAction Id="CPWSetup" BinaryKey="CPWSetup" ExeCommand="/cpw07012009 /W1 /vs" Execute="deferred" Impersonate="no"/>

    <InstallExecuteSequence>
    <Custom Action="CheckGSInstalled" Before="CostInitialize">NOT Installed</Custom>
    <Custom Action="NoGS" After="CheckGSInstalled">(NOT Installed) AND (NOT GhostScriptInstalled)</Custom>
    <Custom Action="CPWSetup" After="InstallInitialize">NOT Installed</Custom>
    </InstallExecuteSequence>

    <UI>
    <Error Id="0">Prerequisite check failed: GhostScript not found!</Error>
    <ProgressText Action="CheckGSInstalled">Checking if GhostScript is installed...</ProgressText>
    <ProgressText Action="CPWSetup">Installing CutePDW Writer...</ProgressText>
    </UI>
    </Product>
    </Wix> - mikekaganski 12 years ago

Inventory Records (1)

View inventory records anonymously contributed by opt-in users of the K1000 Systems Management Appliance.

Versions

CutePDF Writer

Version

2

Questions & Answers (7)

Questions & Answers related to Acro Software CutePDF Writer

0
ANSWERS
1
ANSWERS
6
ANSWERS
14
ANSWERS
2
ANSWERS
10
ANSWERS
18
ANSWERS

Blogs (0)

Blog posts related to Acro Software CutePDF Writer

Reviews (0)

Reviews related to Acro Software CutePDF Writer

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ