http://bugs.winehq.org/show_bug.cgi?id=18089
--- Comment #2 from Igor Tarasov tarasov.igor@gmail.com 2009-04-18 11:57:25 --- Say, we have an application, that has it's exe files located in c:\exes\ and dlls in c:\exes\dlls. When it is being installed, all executables and libraries from both c:\exes and c:\exes\dlls and subfolders get recoreded in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls and nowhere else.
So, installer creates .lnk files that have "start in" parameter having "c:\exes\dlls". Wine converts it to .desktop correctly. Which, does not work well in some systems. See http://www.winehq.org/pipermail/wine-devel/2009-April/074763.html
Now, if you start the app using desktop launcher, it works well. But if you start the app by double-clicking the exe, or calling it from shell, wine won't launch it and you get "err:module:import_dll Library something.dll not found" errors. The only way to launch it is either to use .lnk with "wine start link.lnk", or by cd to work dir an launching app from there, or by copying dlls in question to some folder within PATH scope.
However, in windows application get started well with both .lnk and double-clicking the .exe. That means that in windows import_dll somehow manages to find dlls.
I thought that there might be some differencies in registry values. But as I said, the only place where you can find any notice of these dlls is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls in both wine and windows registries.