DriverInit error, running install.exe from command line

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
zgossman
Posts: 6
Joined: Tue Apr 16 2013

DriverInit error, running install.exe from command line

Post by zgossman »

We're currently running Amyuni's install.exe from a command line, called from an exe which is in turn called by an msi built with wix.

This essentially looks like:
msi/wix custom event-> exe called by custom event creates an Install.exe process in c# -> Process triggers with command line arguments

This first triggers an Amyuni uninstall, then an install to try to ensure that the machine is in the correct state, similar to:
1)Install.exe -s -u "Printer name"
2)Install.exe -s -u
3)Install.exe -s "Printer name" -n "Company name" -c "Key"

This works in most cases. However, we are seeing people who run the msi end up with a "DriverInit failed" error. We have found that as a workaround, they can manually run Install.exe (not from command line) before running the msi, and that seems to allow the install to complete and the printer to be set up properly.

As near as we can figure out, it seems that the msi's use of Install.exe gets the Amyuni printer driver to install (showing up using "printui.exe /s /t2" in cmd), but does not get the printer itself installed properly, so when the printer is referenced, it is not found. The only call to the Amyuni installer includes information about the printer to be set up, so it's odd that it should get to the driver installed but not continue on to installing the printer. It also seems that using Install.exe to uninstall Amyuni (with -s -u) uninstalls the printer (if it exists) but does not uninstall the drivers. So we're getting a driver hanging around from an incomplete install which is not wiped out during uninstall. And the fact that wiping that driver out manually in printui.exe and then manually running the installer before running our msi with the programmed install.exe references works makes me think that something here is amiss.

Is there anything that could shed some light on this issue? If you need any more information about the machine or installation setup, let me know. I've been spinning my wheels on this for a few days now, and it's blocking some of our customers from using the product. Thanks!
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: DriverInit error, running install.exe from command line

Post by Rich »

In situations like this we try to take out all the external variables that installs our PDF printer. I have referenced a webpage from our Resources | Documentation section of our website that better explains a command line install.

Using the Developer Version of the Amyuni Document Converter
http://amyuni.com/WebHelp/Amyuni_Docume ... verter.htm

If the License to and/or the Activation code are inputted wrong (ie. extra character, missing character) then a PDF Document Converter printer will get installed but it would not be properly enabled. You can determine this by going to the Printer properties | About... tab and check who the product is licensed to. If it says N/A then it is not properly enabled.

Also, an install.log gets created where you have the distributable folder that may lead to why it is failing. No 64-bit drivers for 64-bit PC?

Start at this level and get a correctly enabled printer installed.

Version 2.5 to version 4.0, when installing on a 64-bit PC, requires that the printer is assigned to the NUL: port. You can add this to the command line script by using the "-o" switch. Version 4.5 takes care of creating and/or adding the printer to the NUL: port.

If you are attempting to install the same version then uninstalling the product is not necessary if the first time it failed to install correctly.

If the PDF converter is installed correctly and you want to test it out you can use a very basic VB script that converts a text file to PDF:

http://amyuni.com/forum/viewtopic.php?f=2&t=2868

Hope this helps.
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
zgossman
Posts: 6
Joined: Tue Apr 16 2013

Re: DriverInit error, running install.exe from command line

Post by zgossman »

Thanks for the quick response Rich!

The issue we're seeing is that the driver gets installed (as shown in printui) but the printer does not reliably get installed to devices and printers when installing from command line. The log file looks like this:

Windows 64-bit x86 Install
------------------------------------------------------------------------------------
Checking for existing PDF printer
------------------------------------------------------------------------------------
Installing using .inf file
------------------------------------------------------------------------------------
Copying cdintf.dll file
------------------------------------------------------------------------------------
Copying xmllite.dll file
------------------------------------------------------------------------------------
Copying cdintf64.dll file
------------------------------------------------------------------------------------
Copying xmllite64.dll file
------------------------------------------------------------------------------------
Installing Amyuni PDF printer driver
------------------------------------------------------------------------------------
Installing Amyuni PDF printer
Error Code: 6
The handle is invalid.
------------------------------------------------------------------------------------
Printer setup failed
Error Code: 6
The handle is invalid.
------------------------------------------------------------------------------------

This is on a windows 7 64-bit machine, and I see two separate entries for the x64 Amyuni drivers in printui. If I manually uninstall those drivers and run Install.exe by double-clicking it before I run our installer, it works and future uninstalls/installs work so long as we don't touch the driver entry in printui. I'd prefer not to have to use this workaround indefinitely, though :)
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: DriverInit error, running install.exe from command line

Post by Rich »

What we never established is what version of the CDINTF are you using to install? This can be found under Properties | Details tab.

http://amyuni.com/forum/viewtopic.php?f ... alid#p6894

Anything less than 4.0 is not supported as it is a bit legacy. 5.0 will be out soon and it will be Microsoft certified for Windows 8 and Server 2012.

Hope this helps.
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
zgossman
Posts: 6
Joined: Tue Apr 16 2013

Re: DriverInit error, running install.exe from command line

Post by zgossman »

We're currently using 4.5.2.9, and I've tried using 4.5.3.3 as well.
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: DriverInit error, running install.exe from command line

Post by Rich »

The following are demo keys for the 4.5 product regardless of which sub-version. You need to open up a command prompt as an administrator and change to the directory where all the distributable files are and run:

Install.exe -N "Amyuni PDF Converter Evaluation" -C "07EFCDAB0100010025AFF1806CB8441306C5739F7DC52654D393BA9CECBA2ADE79E3762A64FFC3540A8A5F4A5811BE3204A0A439F5BA"

Another method to see if the PDF Converter installs without issues is to "Add a printer" found under the Devices and Printers. When prompted you need to point it to the Amyuni.inf file.

It really should not be this difficult and we need to take out the WIX installer from the equation to see if our PDF printer installs in its basic form. I used 4.5.3.5 and the above script and it installed an enabled printer. If you are having difficulties at this level to get an enabled printer installed then there is a bigger problem that needs to be investigated.

Hope this helps.
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
zgossman
Posts: 6
Joined: Tue Apr 16 2013

Re: DriverInit error, running install.exe from command line

Post by zgossman »

I've narrowed this down further. Issue is that users have an Amyuni driver already installed before using our installer. If they try to install without wiping out that driver, the Printer does not show up in Devices and Printers and the install fails with the log I posted above.

However, if they remove it manually before doing the install it works fine. They can do this by opening an administrative cmd and typing "printui.exe /s /t2", navigating to the Amyuni entry, choosing Remove->Remove driver and driver package, and then afterwards running our installer. This works.

I'm currently trying to find a way to programmatically wipe any Amyuni drivers at the start of my installer so we don't have to point users to a workaround whenever they install, but any advice specific to this issue that you might have would be appreciated. Thanks.
zgossman
Posts: 6
Joined: Tue Apr 16 2013

Re: DriverInit error, running install.exe from command line

Post by zgossman »

Rich wrote:The following are demo keys for the 4.5 product regardless of which sub-version. You need to open up a command prompt as an administrator and change to the directory where all the distributable files are and run:

Install.exe -N "Amyuni PDF Converter Evaluation" -C "07EFCDAB0100010025AFF1806CB8441306C5739F7DC52654D393BA9CECBA2ADE79E3762A64FFC3540A8A5F4A5811BE3204A0A439F5BA"

Another method to see if the PDF Converter installs without issues is to "Add a printer" found under the Devices and Printers. When prompted you need to point it to the Amyuni.inf file.

It really should not be this difficult and we need to take out the WIX installer from the equation to see if our PDF printer installs in its basic form. I used 4.5.3.5 and the above script and it installed an enabled printer. If you are having difficulties at this level to get an enabled printer installed then there is a bigger problem that needs to be investigated.

Hope this helps.
So I tried this exactly, completely separate from the WIX install, and I still get the same error. See screenshot for the result after the install attempt:
http://i.imgur.com/TwhApwE.jpg
And the "Add a printer" attempt"
http://i.imgur.com/dR6sYYj.jpg

Here's a link to the .inf file it's using:
https://www.box.com/s/03n6t0q2t8zm0bpekauz

I've tried a number of things to programmatically work around this, including calling the installer with more/less in the command line/calling it multiple times, wiping out any pre-existing drivers before calling it, installing the amyuni printer, and hooking up that printer to a NUL: port, etc., and none are working reliably from a programmatic standpoint.

We have sent out a set of manual workaround instructions that seems to be helping some users, but I can attest that these do not suffice in all cases:
http://community.docusign.com/t5/Tips-T ... td-p/18711

Let me know if you have any further ideas.
zgossman
Posts: 6
Joined: Tue Apr 16 2013

Re: DriverInit error, running install.exe from command line

Post by zgossman »

For people coming in to this topic. We ended up fixing the DriverInit issue by getting a fresh copy of all the the redistributables. Somehow one of the .dlls we had became corrupted.
sprezzatura
Posts: 46
Joined: Fri Nov 18 2005
Location: Nova Scotia

Re: DriverInit error, running install.exe from command line

Post by sprezzatura »

I'm trying to install an Amyuni PDF printer in a WiX installer.

I am getting an error 1721, "A program required for this install to complete could not be run".

I've tried Execute="deferred" and "immediate", Impersonate="no" and "yes", to no avail.

Here's my code:

<Binary Id="Amyuni" SourceFile="C:\\Amyuni\\PDF Converter 4.5.1.0\\PDF Converter\\PDF Converter Printer Driver\\Install.exe"/>
<CustomAction Id="Install_PDF_printer" BinaryKey="Amyuni"
ExeCommand='[INSTALLFOLDER]Install.exe -s "Printer Name" -n "Customer ID" -c "**********"'
Execute="deferred" Return="check" HideTarget="no" Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="Install_PDF_printer" Before="InstallFinalize" />
</InstallExecuteSequence>

I would appreciate any suggestions, or sample code.

Thanks,

Pierre Clouthier
Last edited by sprezzatura on Sun Jul 07 2013, edited 1 time in total.
Devteam
Posts: 119
Joined: Fri Oct 14 2005
Location: Montreal
Contact:

Re: DriverInit error, running install.exe from command line

Post by Devteam »

The most probable cause of error 1721 is that Install.exe is not finding all the files needed to install the printer. Please check the online documentation at http://www.amyuni.com/WebHelp/Developer ... uction.htm for the list of required files.
Amyuni Development Team

Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - https://www.amyuni.com
sprezzatura
Posts: 46
Joined: Fri Nov 18 2005
Location: Nova Scotia

Re: DriverInit error, running install.exe from command line

Post by sprezzatura »

You are correct, and that was caused by making Install.exe search for embedded components ("BinaryKey") instead of amidst the installed files ("FileKey"). The correct form is:

Code: Select all

<Product ...>
	<CustomAction Id="Install_PDF_printer" FileKey="Install.exe"
		ExeCommand='Install.exe -s "My PDF Printer" -n "My Company" -c "************" '
		Execute="deferred" Return="check" HideTarget="no" Impersonate="no" />

	<DirectoryRef Id="INSTALLFOLDER">
		<Component Id="Install.exe" Guid="*">
			<File Id="Install.exe" Source="C:\\Amyuni\\PDF Converter 4.5.1.0\\PDF Converter\\PDF Converter Printer Driver\\Install.exe" KeyPath="yes" Checksum="yes"/>
		</Component>
	</DirectoryRef>
	
	<Feature Id="MainApplication" Title="Main Application" Level="1">
		<ComponentRef Id="Install.exe" />
	</Feature>
	
	<InstallExecuteSequence>
		<Custom Action="Install_PDF_printer" After="InstallFiles" />
	</InstallExecuteSequence>
</Product>
(That's two days of futzing with WiX. You're welcome).
Post Reply