/build/static/layout/Breadcrumb_cap_w.png

CutePDF Windows 7 print driver problem

Hi all,

I am packaging CutePDF for a Windows 7 environment and I can't for the life of me get the rundll32 command to work.
I get an error message that says "Operation could not be completed (0x00000002)".

The command line I am using to install my printer is

rundll32.exe printui.dll,PrintUIEntry /if /b "CutePDF Writer" /f "C:\Program Files\Acro Software\CutePDF Writer\cutepdf.inf" /r "CPW2:" /m "CutePDF Writer"

I used the suggestion from the Package KB to populate my inf file and my inf file looks like this -

*************************************************************************************

[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",,,""
2 = "CutePDF3",PSCRIPT.HLP,,3,""

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

*************************************************************************************************
Has anyone got any ideas why I'm getting this error message?
Thanks,
Mark

0 Comments   [ + ] Show comments

Answers (12)

Posted by: captain_planet 14 years ago
Black Belt
0
Mark, that post by BEPhipps worked for me. The ordering of the steps in there are VERY important though, so re-trace your steps. Also, you've added an extra line here '2 = "CutePDF3",PSCRIPT.HLP,,3,""' under '[SourceDisksNames.x86]' so you may want to check that works. I'd also check your sequencing in the Windows Installer. Remember this CA needs to run somewhere after installFiles and before InstallFinalize in the deferred context.....
Posted by: Manu77 14 years ago
Orange Senior Belt
0
Hi Mark,

Restarting the machine after installing application may help.

Manu
Posted by: mark_holland21 14 years ago
Fourth Degree Green Belt
0
Hi Captain_planet,

Thanks for your reply, I am trying the command line outside of my msi initially so sequencing isn't even in the equation just yet and I am still getting the issue.

I am using Windows 7 and I am not sure if there's a difference with how Windows 7 handles drivers versus Windows XP.

I've also followed the post by BEPhipps to the letter and I still get the error.

Not sure what to do....

I will try the restart option next but I'm not sure if that's going to do it.....
Posted by: captain_planet 14 years ago
Black Belt
0
....to be honest, I can't comment on Windows 7 Mark. I don't even have a VM with it on any more. Have you got an XPSP2 vm? I guess if it works on that, you know it's Windows 7-specific and if so, one of the other boys will have to jump in here I'm afraid.....

Try using ProcMon too. It may tell you a bit more about what's going on.....
Posted by: captain_planet 14 years ago
Black Belt
0
Hmmm, I just read this, out of interest..... "In Windows 7 PRINTUI.EXE can be used as shorthand for RUNDLL32 PRINTUI.DLL,PrintUIEntry"

Not that it probably helps....
Posted by: Manu77 14 years ago
Orange Senior Belt
0
The command line works without restart.

If captured it throws error. I just restarted the machine before second capture it worked well for me.

Manu
Posted by: mark_holland21 14 years ago
Fourth Degree Green Belt
0
Hi Manu,

Thanks for your reply, could you please post the command line that you are running, plus the contents and location of the cutepdf.inf file?
I am just about to try this printui.exe to see how that does.
Posted by: Manu77 14 years ago
Orange Senior Belt
0
Hi Mark,

I installed the application following way,

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

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

3. Create the following registry entries.

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

4. Restart the spool service

NET STOP SPOOLER
NET START SPOOLER

5. Created cutepdf.inf and added the following entries. Saved 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

6. Run the following command,

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


Hope this helps.
Posted by: mark_holland21 14 years ago
Fourth Degree Green Belt
0
I got it to work....to a point.
I've managed to use everything Manu77 has said and it worked ok.
In my msi I've used a VBScript to stop the print spooler service, then I use the rundll32 command to install the printer driver and then i use a VBScript to restart my Print Spooler service.

All works ok apart from the Unsigned Driver warning that pops up when the Custom Action to install the driver is run.

Our Group Policy is set up to allow unsigned drivers to be installed without a warning and so I am hoping this will overcome this issue.

However, in the meantime to test I tried the following 2 switches to disable the Driver Signing in Windows 7 but it doesn't work and the warning dialog still appears during install.

bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING ON

Anyone know what I could do here?

Thanks for your replies.
Rgds,
Mark
Posted by: captain_planet 14 years ago
Black Belt
0
Have you tried using the /q switch for quiet mode?

rundll32 printui.dll,PrintUIEntry /if /b "CutePDF Writer" /f cutepdf.inf /r "CPW2:" /m "CutePDF Writer" /q
Posted by: mark_holland21 14 years ago
Fourth Degree Green Belt
0
Hi,

Yes I tried /q and I also tried /Gw but all this does is suppress the dialog. The driver doesn't install with these switches.
Thanks for the idea,
Still no joy....

Rgds,
Mark
Posted by: Stueymonster 14 years ago
Yellow Belt
0
@Mark_Holland21

Hi, this has worked for me on other troublesome installes that popped up with the driver signing prompt in Windows 7, but I have not tested for CutePDF.

Install CutePDF on any machine manually, when you have clicked the "always trust..." it should install the certificate in the following reg location:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\TrustedPublisher\Certificates\<cetificate ID here>

Simply export the reg key to a reg file and import it as part of the install, but before everything else. You should then get a completely unattended and silent install.

Hope that works for you, please let me know (as CutePDF is on my list to package for this years build)

Stu
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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