[Bug 50589] New: Foxit PhantomPDF Business v10.0 installer fails, reports 'Printer installation failed, please check the print service.'

WineHQ Bugzilla wine-bugs at winehq.org
Sat Jan 30 04:45:29 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=50589

            Bug ID: 50589
           Summary: Foxit PhantomPDF Business v10.0 installer fails,
                    reports 'Printer installation failed, please check the
                    print service.'
           Product: Wine
           Version: 6.1
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spooler
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

as it says.

Stable download link via Internet Archive:

https://web.archive.org/web/20210129125039/https://cdn09.foxitsoftware.com/product/phantomPDF/desktop/win/10.0/3944C0ADCC878224B13B138F985EC3D7/FoxitPhantomPDF100_L10N_Setup_Website.exe

Relevant part of trace log (failing custom action):

--- snip ---
$ WINEDEBUG=+seh,+relay,+loaddll,+msi,+winspool,+spooler,+localspl wine
./FoxitPhantomPDF100_L10N_Setup_Website.exe >>log.txt 2>&1
...
0114:trace:msi:ACTION_CustomAction Handling custom action
L"InstallPDFPrinter.0D75A8F9_7D69_45B2_8FCA_D8FCA48808A3" (c01
L"FX_CUSTOM.0D75A8F9_7D69_45B2_8FCA_D8FCA48808A3" L"InstallPDFPrinter") 
...
0114:trace:msi:HANDLE_CustomType1 Calling function L"InstallPDFPrinter" from
L"C:\\users\\focht\\Temp\\msicd4a.tmp"
...
0224:Call KERNEL32.LoadLibraryW(0019f628
L"C:\\users\\focht\\Temp\\msicd4a.tmp") ret=100210f6 
....
0224:trace:loaddll:build_module Loaded L"C:\\windows\\syswow64\\WINSPOOL.DRV"
at 7D240000: builtin
0224:trace:loaddll:build_module Loaded L"C:\\users\\focht\\Temp\\msicd4a.tmp"
at 01600000: native
0224:Call PE DLL (proc=7D265310,module=7D240000
L"WINSPOOL.DRV",reason=PROCESS_ATTACH,res=00000000) 
...
0224:trace:winspool:load_cups 0x7d101260: libcups.so.2 loaded 
...
0224:trace:winspool:WINSPOOL_LoadSystemPrinters Init already done 
...
0224:Call PE DLL (proc=0161AB32,module=01600000
L"msicd4a.tmp",reason=PROCESS_ATTACH,res=00000000) 
...
0224:Ret  KERNEL32.LoadLibraryW() retval=01600000 ret=100210f6
0224:Call KERNEL32.GetProcAddress(01600000,0019ce80 "InstallPDFPrinter")
ret=1002110a
0224:Ret  KERNEL32.GetProcAddress() retval=016147a0 ret=1002110a 
...
0224:Call KERNEL32.CreateFileW(01641310
L"C:\\users\\focht\\Temp\\foxit_setup_ca.log",40000000,00000003,015ee880,00000002,00000080,00000000)
ret=016292dd
0224:Ret  KERNEL32.CreateFileW() retval=0000044c ret=016292dd
...
0224:Call
winspool.drv.GetPrinterDriverDirectoryW(00000000,00000000,00000001,015ee81c,00000208,015ee610)
ret=0160188d
0224:trace:winspool:GetPrinterDriverDirectoryW ((null), (null), 1, 0x15ee81c,
520, 0x15ee610)
0224:Call KERNEL32.LoadLibraryA(7d269442 "localspl.dll") ret=7d2651fc 
...
0224:trace:loaddll:build_module Loaded L"C:\\windows\\syswow64\\spoolss.dll" at
01770000: builtin
0224:trace:loaddll:build_module Loaded L"C:\\windows\\syswow64\\localspl.dll"
at 01750000: builtin
0224:Call PE DLL (proc=017741A0,module=01770000
L"spoolss.dll",reason=PROCESS_ATTACH,res=00000000) 
...
0224:Call localspl.InitializePrintProvidor(7d27a5e0,00000158,00000000)
ret=7d26523b
0224:trace:localspl:InitializePrintProvidor (7D27A5E0, 344, (null))
...
0224:Ret  localspl.InitializePrintProvidor() retval=00000001 ret=7d26523b
0224:trace:winspool:load_backend backend: 0x7d27a5e0 (0x1750000)
0224:trace:localspl:fpGetPrinterDriverDirectory ((null), (null), 1, 015EE81C,
520, 015EE610)
0224:trace:localspl:validate_envW ((null)) 
...
0224:trace:localspl:validate_envW => using 0175AFB8: L"Windows NT x86"
...
0224:trace:localspl:fpGetPrinterDriverDirectory =>
L"C:\\windows\\system32\\spool\\drivers\\w32x86"
0224:Ret  winspool.drv.GetPrinterDriverDirectoryW() retval=00000001
ret=0160188d 
...
0224:Call KERNEL32.IsWow64Process(ffffffff,015ee2fc) ret=01602d96
0224:Ret  KERNEL32.IsWow64Process() retval=00000001 ret=01602d96
...
0224:Call
winspool.drv.GetPrinterDriverDirectoryW(00000000,00000000,00000001,015eee24,00000208,015ee318)
ret=016123e8
0224:trace:winspool:GetPrinterDriverDirectoryW ((null), (null), 1, 0x15eee24,
520, 0x15ee318)
0224:trace:localspl:fpGetPrinterDriverDirectory ((null), (null), 1, 015EEE24,
520, 015EE318)
0224:trace:localspl:validate_envW ((null)) 
...
0224:trace:localspl:fpGetPrinterDriverDirectory =>
L"C:\\windows\\system32\\spool\\drivers\\w32x86"
0224:Ret  winspool.drv.GetPrinterDriverDirectoryW() retval=00000001
ret=016123e8 
...
0224:Call KERNEL32.CopyFileW(01641718 L"C:\\Program Files (x86)\\Foxit
Software\\Foxit PhantomPDF\\plugins\\spool\\spoolpnt\\fpmvpr_pnt.txt",015ee80c
L"C:\\windows\\system32\\spool\\drivers\\w32x86\\fpmvpr_pnt.txt",00000000)
ret=01612726 
0224:Ret  KERNEL32.CopyFileW() retval=00000001 ret=01612726 
...
0224:Call KERNEL32.CopyFileW(016418d8 L"C:\\Program Files (x86)\\Foxit
Software\\Foxit PhantomPDF\\plugins\\spool\\fpmvpr_ui_x64.dll",015eec1c
L"C:\\windows\\system32\\spool\\drivers\\w32x86\\fpmvpr_ui.dll",00000000)
ret=01612a11 
0224:Ret  KERNEL32.CopyFileW() retval=00000001 ret=01612a11 
...
0224:Call KERNEL32.CopyFileW(016419b8 L"C:\\Program Files (x86)\\Foxit
Software\\Foxit PhantomPDF\\plugins\\spool\\fpmvpr_drv_x64.dll",015eea14
L"C:\\windows\\system32\\spool\\drivers\\w32x86\\fpmvpr_drv.dll",00000000)
ret=01612c6c 
0224:Ret  KERNEL32.CopyFileW() retval=00000001 ret=01612c6c 
...
0224:Call advapi32.OpenSCManagerW(00000000,00000000,000f003f) ret=01602a01 
...
0224:Ret  advapi32.OpenSCManagerW() retval=0018df20 ret=01602a01
0224:Call KERNEL32.GetLastError() ret=01602a0b
0224:Ret  KERNEL32.GetLastError() retval=00000000 ret=01602a0b
0224:Call advapi32.OpenServiceW(0018df20,0162e744 L"Spooler",000f01ff)
ret=01602a44 
...
0224:Ret  advapi32.OpenServiceW() retval=0018df50 ret=01602a44
0224:Call KERNEL32.GetLastError() ret=01602a48
0224:Ret  KERNEL32.GetLastError() retval=00000000 ret=01602a48
0224:Call advapi32.StartServiceW(0018df50,00000000,00000000) ret=01602a7b 
...
0224:Ret  advapi32.StartServiceW() retval=00000001 ret=01602a7b
0224:Call advapi32.QueryServiceStatus(0018df50,015ef020) ret=01602a88 
...
0224:Call KERNEL32.LoadLibraryW(0162e700 L"winspool.drv") ret=01611843 
...
0224:Ret  KERNEL32.LoadLibraryW() retval=7d240000 ret=01611843
0224:Call KERNEL32.GetProcAddress(7d240000,0162efa8 "XcvDataW") ret=016118a0
0224:Ret  KERNEL32.GetProcAddress() retval=7d24f834 ret=016118a0
0224:Call winspool.drv.OpenPrinterW(0162e4cc L", XcvMonitor Local
Port",015eec20,015eec10) ret=0161192b
...
0224:trace:winspool:OpenPrinterW (L", XcvMonitor Local Port", 0x15eec20,
0x15eec10)
...
0224:trace:localspl:fpOpenPrinter (L", XcvMonitor Local Port", 00171BE0,
015EEC10) 
...
0224:Call ucrtbase.wcsncmp(0162e4cc L", XcvMonitor Local Port",0175a974
L",XcvMonitor ",0000000c) ret=017533fd
0224:Ret  ucrtbase.wcsncmp() retval=ffffffc8 ret=017533fd
0224:Call ucrtbase.wcsncmp(0162e4cc L", XcvMonitor Local Port",0175a9a0
L",XcvPort ",00000009) ret=01753416
0224:Ret  ucrtbase.wcsncmp() retval=ffffffc8 ret=01753416
0224:Call advapi32.RegCreateKeyW(80000002,0175a9c2
L"System\\CurrentControlSet\\Control\\Print\\Printers",015eeaf4) ret=01753447 
...
0224:Ret  advapi32.RegCreateKeyW() retval=00000000 ret=01753447
0224:Call advapi32.RegOpenKeyW(00000450,0162e4cc L", XcvMonitor Local
Port",015eeaf8) ret=017536d9 
...
0224:Ret  advapi32.RegOpenKeyW() retval=00000002 ret=017536d9
...
0224:warn:localspl:printer_alloc_handle Printer not found in Registry: L",
XcvMonitor Local Port" 
...
0224:trace:localspl:printer_alloc_handle ==> 00000000
...
0224:trace:winspool:OpenPrinterW returning 0 with 1801 and (nil)
0224:Ret  winspool.drv.OpenPrinterW() retval=00000000 ret=0161192b 
...
0224:Call KERNEL32.GetLastError() ret=0161195c
0224:Ret  KERNEL32.GetLastError() retval=00000709 ret=0161195c 
...
0100:Call user32.MessageBoxW(0001005e,02a21b10 L"Printer installation failed,
please check the print service.",02249a38 L"Foxit PhantomPDF",00000000)
ret=01832dbc 
...
--- snip --- 

The custom action 'InstallPDFPrinter' creates a log file on its own:

'foxit_setup_ca.log':

--- snip ---
Fri Jan 29 23:50:02 2021
 [InstallPDFPrinter] InstallPDFPrinter started. <441>
Fri Jan 29 23:50:02 2021
 [IsPrintFileThere] C:\Program Files (x86)\Foxit Software\Foxit
PhantomPDF\plugins\spool\fpmvpr_drv_x64.dll <269>
Fri Jan 29 23:50:02 2021
 [IsPrintFileThere] C:\Program Files (x86)\Foxit Software\Foxit
PhantomPDF\plugins\spool\fpmvpr_ui_x64.dll <270>
Fri Jan 29 23:50:02 2021
 [IsPrintFileThere] fpmvpr exit <273>
Fri Jan 29 23:50:02 2021
 [InstallPDFPrinter] The old files has been removed. <467>
Fri Jan 29 23:50:02 2021
 [InstallFile] Start install printer files. <1738>
Fri Jan 29 23:50:02 2021
 [InstallFile] Machine is 64bit. <1743>
Fri Jan 29 23:50:02 2021
 [InstallFile] Printer driver's directory is
C:\windows\system32\spool\drivers\w32x86. <1767>
Fri Jan 29 23:50:02 2021
 [InstallFile] C:\Program Files (x86)\Foxit Software\Foxit
PhantomPDF\plugins\spool\spoolpnt\fpmvpr_pnt.txt exists. <1794>
Fri Jan 29 23:50:02 2021
 [InstallFile] C:\Program Files (x86)\Foxit Software\Foxit
PhantomPDF\plugins\spool\fpmvpr_ui_x64.dll exists. <1818>
Fri Jan 29 23:50:02 2021
 [InstallFile] C:\Program Files (x86)\Foxit Software\Foxit
PhantomPDF\plugins\spool\fpmvpr_drv_x64.dll exists. <1838>
Fri Jan 29 23:50:02 2021
 [InstallPDFPrinter] New files copied. <470>
Fri Jan 29 23:50:02 2021
 [InstallPDFPrinter] GetInstallPrinterParam finished. strPortName:FOXIT_PDF:
strDriverName:Foxit PhantomPDF Printer Driver strPrinterName:Foxit PhantomPDF
Printer <473>
Fri Jan 29 23:50:02 2021
 [FAddPrinterPort] FAddPrinterPort started. <1494>
Fri Jan 29 23:50:02 2021
 [FAddPrinterPort] OpenPrinter failed. GetLastError:1801 <1530>
Fri Jan 29 23:50:02 2021
 [InstallPDFPrinter] FAddPrinterPort failed. <479>
--- snip --- 

I had to look twice at the log to spot the problem. There is an additional
space character:

App installer: ', XcvMonitor Local Port'
Wine: ',XcvMonitor Local Port'

Wine source:

https://source.winehq.org/git/wine.git/blob/47ac628b4a4e476c1b044765c95d5be2a7101d14:/dlls/localspl/provider.c#l1254

--- snip ---
1254 /******************************************************************
1255  *  printer_alloc_handle
1256  *  alloc a printer handle and remember the data pointer in the printer
handle table
1257  *
1258  */
1259 static HANDLE printer_alloc_handle(LPCWSTR name, LPPRINTER_DEFAULTSW
pDefault)
1260 {
1261     WCHAR servername[MAX_COMPUTERNAME_LENGTH + 1];
1262     printer_t *printer = NULL;
1263     LPCWSTR printername;
1264     HKEY    hkeyPrinters;
1265     HKEY    hkeyPrinter;
1266     DWORD   len;
1267 
1268     if (copy_servername_from_name(name, servername)) {
1269         FIXME("server %s not supported\n", debugstr_w(servername));
1270         SetLastError(ERROR_INVALID_PRINTER_NAME);
1271         return NULL;
1272     }
1273 
1274     printername = get_basename_from_name(name);
1275     if (name != printername) TRACE("converted %s to %s\n",
debugstr_w(name), debugstr_w(printername));
1276 
1277     /* an empty printername is invalid */
1278     if (printername && (!printername[0])) {
1279         SetLastError(ERROR_INVALID_PARAMETER);
1280         return NULL;
1281     }
1282 
1283     printer = heap_alloc_zero(sizeof(printer_t));
1284     if (!printer) goto end;
1285 
1286     /* clone the base name. This is NULL for the printserver */
1287     printer->printername = strdupW(printername);
1288 
1289     /* clone the full name */
1290     printer->name = strdupW(name);
1291     if (name && (!printer->name)) {
1292         printer_free(printer);
1293         printer = NULL;
1294     }
1295     if (printername) {
1296         len = ARRAY_SIZE(L",XcvMonitor ") - 1;
1297         if (wcsncmp(printername, L",XcvMonitor ", len) == 0) {
1298             /* OpenPrinter(",XcvMonitor ", ...) detected */
1299             TRACE(",XcvMonitor: %s\n", debugstr_w(&printername[len]));
1300             printer->pm = monitor_load(&printername[len], NULL);
1301             if (printer->pm == NULL) {
1302                 printer_free(printer);
1303                 SetLastError(ERROR_UNKNOWN_PORT);
1304                 printer = NULL;
1305                 goto end;
1306             }
1307         }
1308         else
1309         {
1310             len = ARRAY_SIZE(L",XcvPort ") - 1;
1311             if (wcsncmp( printername, L",XcvPort ", len) == 0) {
1312                 /* OpenPrinter(",XcvPort ", ...) detected */
1313                 TRACE(",XcvPort: %s\n", debugstr_w(&printername[len]));
1314                 printer->pm = monitor_load_by_port(&printername[len]);
1315                 if (printer->pm == NULL) {
1316                     printer_free(printer);
1317                     SetLastError(ERROR_UNKNOWN_PORT);
1318                     printer = NULL;
1319                     goto end;
1320                 }
1321             }
1322         }
...
--- snip ---

Line 1297 obviously can't work and needs to be relaxed. Although not a problem
here, I suspect other hard-coded comparisions need to be relaxed as well: line
1311.

When you fix it, make sure the name offset passed to 'monitor_load' and
'monitor_load_by_port' is still correct because it's used to match registry
sub-keys ('Local Port' etc.).

With that part fixed, the installer completes successfully.

Documentation tidbits:

https://stackoverflow.com/questions/1325485/how-to-create-a-new-port-and-assign-it-to-a-printer

http://unixwiz.net/temptips/windows-printsystem.html

$ sha1sum FoxitPhantomPDF100_L10N_Setup_Website.exe 
7c22cfb60e8e23d6106ced96e3979c5e053fd60a 
FoxitPhantomPDF100_L10N_Setup_Website.exe

$ du -sh FoxitPhantomPDF100_L10N_Setup_Website.exe 
670M    FoxitPhantomPDF100_L10N_Setup_Website.exe

$ wine --version
wine-6.1

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


More information about the wine-bugs mailing list