winetricks can't install mfc42

I'm trying to have a Windows program (Janome Customizer) run with wine. I have an "out of the box" Ubuntu 64bits 12.04 install, and just ran Software Center to update all packages.

Installation of Customizer went OK, then I run the program, a window appear, but nothing happens when I click a button. So I run the program with what I found in the shortcut installed by wine:

john@mylaptop:~$ env WINEPREFIX="/home/john/.wine" wine "C:\\windows\\command\\start.exe" /Unix "/home/john/.wine/dosdevices/c:/users/Public/Desktop/JANOME Customizer.lnk"

I get two warnings:

fixme:exec:SHELL_execute flags ignored: 0x00000100
fixme:exec:SHELL_execute flags ignored: 0x00004100

The Customizer window appear, and when I click a button this error is printed:

err:module:import_dll Library MFC42.DLL (which is needed by L"C:\\\\Program Files (x86)\\\\janome\\\\Customizer 10000 Plus\\\\MC9500\\\\MkStitch.dll") not found
err:module:import_dll Library MkStitch.dll (which is needed by L"C:\\\\Program Files (x86)\\\\janome\\\\Customizer 10000 Plus\\\\MC9500\\\\EasyImport95.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"C:\\\\Program Files (x86)\\\\janome\\\\Customizer 10000 Plus\\\\MC9500\\\\EasyImport95.exe" failed, status c0000135

So I googled for this error and tried to install mfc42 with winetricks, but I get the error:

john@mylaptop:~$ winetricks mfc42
Executing w_do_call mfc42
Executing load_mfc42
Executing mkdir -p /home/john/.cache/winetricks/vcrun6
Downloading
http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe
to /home/john/.cache/winetricks/vcrun6
--2012-07-28 08:58:50-- 
http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe
Resolving download.microsoft.com (download.microsoft.com)... 158.255.97.16,
158.255.97.65
Connecting to download.microsoft.com
(download.microsoft.com)|158.255.97.16|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-07-28 08:58:51 ERROR 404: Not Found.

------------------------------------------------------
Downloading
http://download.microsoft.com/download/vc60pro/update/1/w9xnt4/en-us/vc6redistsetup_enu.exe
failed
------------------------------------------------------

I tried to manually install mfc42 with other google results, to no avail. I would prefer to use winetricks. If I can't do it with winetricks, manual install belongs to another question.

Just to be sure, I tried booting on a live CD (USB key, actually), with Ubuntu 12.04 32bits. Installed wine through Software Center, but then running winetricks mfc42 yields the same error.

Interestingly, on another computer which I use daily, plugged into the same internet router, installing mfc42 works:

11:35:45 ~>winetricks mfc42
p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: cannot open shared object file: No such file or directory
Executing /usr/bin/cabextract -q /home/jrouquie/.cache/winetricks/vcredist.exe -d /home/jrouquie/.wine/dosdevices/c:/windows/system32 -F mfc42u.dll
Using native,builtin override for following DLLs: msvcrt
Executing early_wine regedit c:\winetrickstmp\override-dll.reg
Install of mfc42 done
winetricks done.

11:36:29 ~>winetricks mfc42
prerequisite vcrun6 already installed, skipping
Install of mfc42 done
winetricks done.

11:46:00 ~>

Thanks for any help installing mfc42.


Solution 1:

Adding the Wine PPA from: http://www.winehq.org/download/ubuntu solved the problem for me.

sudo add-apt-repository  ppa:ubuntu-wine/ppa
sudo apt-get update && sudo apt-get upgrade
winetricks  mfc42

Solution 2:

For some reasons winetricks mfc42 is not working.

Found an alternative way to download mfc42.dll from here. Hope the link is safe enough.

Solution 3:

I copied the files from the other laptop:

scp 192.168.0.10:~/.cache/winetricks/* .cache/winetricks/vcrun6

and it worked.

I'm sorry this is not a solution for someone else browsing here, but at least my problem is solved.

Solution 4:

My answer from another post. This works for all missing DLL files: https://askubuntu.com/a/581881/335595

Problem: MFC42.DLL is missing

Simple fix and this works for any missing .dll files on PlayOnLinux or even Windows itself.

  1. Close your PlayOnLinux & Wine programs. Kill all instances. ("ps aux" and "kill -9" commands)
  2. Google for the dll file name (MFC42.DLL). You'll find a bunch of sites where you can download the file.
  3. Drop the file into your Windows virtual drive's System32 folder - System32 is the core Windows system libraries folder which is scanned and all DLLs there are loaded into Windows:

/home/user/PlayOnLinux's virtual drives/virtual drive name/drive_c/windows/system32

  1. Start your wine/PlayOnLinux and try opening the software again. It should load now.
  2. You may have other DLLs etc missing, so repeat the above steps until you have all the necessary DLLs loaded.

Source: Many years of tears of rage, pain and suffering with Windows.

HTH.