WineHQ
Bug Tracking Database – Bug 15480

 Bugzilla

 

Last modified: 2023-03-04 12:06:22 UTC  

Saving files in Microsoft Word/Excel 2000-2010 creates useless .lnk files (CSIDL_RECENT folder missing)

Bug 15480 - Saving files in Microsoft Word/Excel 2000-2010 creates useless .lnk files (CSIDL_RECENT folder missing)
Saving files in Microsoft Word/Excel 2000-2010 creates useless .lnk files (CS...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: shell32
1.1.4
Other Linux
: P2 minor
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-09-29 20:22 UTC by Andrew Ruthven
Modified: 2023-03-04 12:06 UTC (History)
13 users (show)

See Also:
Regression SHA1:
Fixed by SHA1:
Distribution: ---
Staged patchset:


Attachments
trace+file from opening test1.doc and saving it as test2.doc (104.37 KB, application/x-gzip)
2008-10-02 19:24 UTC, Andrew Ruthven
Details
Error is shell32.dll (Can't get path to users's "Recent" directory) (1.81 KB, text/plain)
2009-09-05 16:38 UTC, zph
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Ruthven 2008-09-29 20:22:49 UTC
Hi,

In Word and Excel 2003 when we save files then a .lnk file is created in the same directory as the source file.  These files are useless for two reasons:

1) They're in the same directory as the original .doc or .xls files which have Word and Excel associated with them respectively.

2) On a standard Debian Lenny machine running Gnome the .lnk files aren't recognised by any apps and won't cause Word or Excel to run.

I've searched around the place to see if we can turn this "feature" off, but haven't found anything.  Is this possible?  If not, could this please be added.
Comment 1 Austin English 2008-09-29 21:28:50 UTC
I don't see this in Office 2007, fwiw.

Can you attach terminal output? How about a +file?
Comment 2 Rosanne DiMesio 2008-10-01 06:51:56 UTC
Office 2003 doesn't do that on my system, openSUSE 10.3, KDE 3.5.9. Maybe a Gnome issue? 
Comment 3 Andrew Ruthven 2008-10-02 04:48:39 UTC
This is actually wine 1.1.4, but has been happening 1.1.2 as well.  Also it is Word 2000 (not 2003).

I'm running it from gnome-open, but the lnk file does show up in the trace.

The steps to reproduce are:

1) Create test1.doc (I used OpenOffice)
2) Open using: gnome-open test1.doc
3) Save As: test2.doc
4) See that test2.doc and test2.doc.lnk are created.

Attached is the trace+file as requested, I've cleaned it up a bit to remove some references to a few files.

I've also just tested it by running:

  wine ~/.wine/drive_c/Program\ Files/Microsoft\ Office/Office/WINWORD.EXE \
    z:/tmp/test2.doc

And followed similar steps - saving as test3.doc - and test3.doc.lnk was created as well.
Comment 4 Andrew Ruthven 2008-10-02 04:58:13 UTC
The trace is too big to upload, it'll have to wait until tomorrow for me to stick it on an appropriate webserver.  I'll update this report with the URL once I've uploaded it.
Comment 5 Austin English 2008-10-02 13:12:09 UTC
(In reply to comment #4)
> The trace is too big to upload, it'll have to wait until tomorrow for me to
> stick it on an appropriate webserver.  I'll update this report with the URL
> once I've uploaded it.
> 

Compress it
Comment 6 Andrew Ruthven 2008-10-02 19:24:43 UTC
Created attachment 16434 [details]
trace+file from opening test1.doc and saving it as test2.doc
Comment 7 Leonid Volnitsky 2008-11-28 00:29:14 UTC
I confirm this bug.  I've seen it with MS Word 2000 too.  But files are created in my home directory.  My home dir is symlinked with desktop dir. I start word from shell wrapper as: 

wine "C:\program files\microsoft office\office\winword.exe" `winepath -w "$@"`

I do remember that in the past I've seen LNK files created in the same dir as original doc files. 
  

Comment 8 Lei Zhang 2008-12-02 20:10:26 UTC
confirming then.
Comment 9 Austin English 2009-06-02 10:37:33 UTC
Is this still an issue in current (1.1.22 or newer) wine?
Comment 10 Andrew Ruthven 2009-06-22 22:23:55 UTC
Yes, this behaviour still occurs in 1.1.24.
Comment 11 zph 2009-09-05 04:22:01 UTC
Wine 1.28, MSO 2003
This .lnk files creating not only when files saving. .lnk files create for all open files when MSO to close. 
The path for saving *.lnk is current active dir of MSO. (Dir to open/save last files, or path to "My Documents", when new documents was created)
Comment 12 zph 2009-09-05 16:38:33 UTC
Created attachment 23458 [details]
Error is shell32.dll (Can't get path to users's "Recent" directory)

To test this bug I open "test_file.doc" and close it [push [x] button on window border].
Comment 13 Rosanne DiMesio 2010-05-31 22:50:07 UTC
Is this still an issue in current Wine (1.2-rc2 or later)?
Comment 14 zph 2010-06-08 09:48:59 UTC
(In reply to comment #13)
> Is this still an issue in current Wine (1.2-rc2 or later)?

I tested wine 1.2-rc2 with MSO 2003 (Word and Excel). I open|close|save files but I don't find any created useless *.lnk files. Issue don't present in wine 1.2-rc2.
Comment 15 Rosanne DiMesio 2010-06-08 10:07:11 UTC
Reported fixed.
Comment 16 Alexandre Julliard 2010-06-11 12:50:27 UTC
Closing bugs fixed in 1.2-rc3.
Comment 17 Edward d'Auvergne 2012-01-31 11:48:35 UTC
This problem is still present in wine 1.3.34 with Office 2007!  The fix is simple, just create the ~/.wine/drive_c/users/xxxx/Recent directory.  With this directory missing, the *.lnk files are created in the same directory as the MSOffice file.  With the directory present, the *.lnk files are created in the correct history location.  I am unsure why the ~/.wine/drive_c/users/xxxx/Recent directory was missing.

The bug should probably be considered for reopening.  A proper fix for the bug would be to create this directory should if not present rather than shell32.dll throwing an error and dumping the lnk file in the same directory.
Comment 18 stasik0 2012-05-15 02:55:19 UTC
The bug should be reopened. I experience the same issues on Wine 1.5.4 and Word 2010. Creating a Recent folder did not help.
Comment 19 stasik0 2012-05-15 06:50:22 UTC
(In reply to comment #18)
> The bug should be reopened. I experience the same issues on Wine 1.5.4 and Word
> 2010. Creating a Recent folder did not help.

Recent folder creation helped. Sorry. However, the bug is still present.
Comment 20 deslux 2013-04-14 13:20:03 UTC
Same here:

 - The bug is still active on Wine 1.4 (Ubuntu 10.04, Office 2010)
 - The creation of ~/.wine/drive_c/users/xxxx/Recent solved it
Comment 21 Hernan Antolini 2013-06-10 16:31:20 UTC
I verified same situation with the following versions :

wine 1.5.23
winetricks 20120912
playonlinux 4.2.1
OpenSuSE 12.3
oFFICE 2010

The workaround actually works, i've created the Recent directory in 
~/.PlayOnLinux/wineprefix/Office2010/drive_c/users/xxxxx
Comment 22 Dan Kegel 2013-06-10 16:44:54 UTC
Curses, opened again!
Comment 23 Ante de Baas 2013-08-26 09:04:03 UTC
(In reply to comment #21)
> I verified same situation with the following versions :
> 
> wine 1.5.23
> winetricks 20120912
> playonlinux 4.2.1
> OpenSuSE 12.3
> oFFICE 2010
> 
> The workaround actually works, i've created the Recent directory in 
> ~/.PlayOnLinux/wineprefix/Office2010/drive_c/users/xxxxx

Confirmed, running Wine 1.6 on Fedora 19.
same problem, creating a Recent directory works.
Comment 24 Anastasius Focht 2014-03-01 13:01:44 UTC
Hello folks,

CSIDL_RECENT folder will be automatically created upon WINEPREFIX creation ('rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 ...wine.inf')

NOTE: It won't be (re)created by Wine if you keep very old prefixes around.
      Either create it manually or use a new prefix.

--- snip ---
...
0011:trace:shell:SHGetFolderPathAndSubDirW Created missing system directory L"C:\\users\\focht\\Recent"
0011:trace:shell:SHGetFolderPathAndSubDirW returning 0x00000000 (final path is L"C:\\users\\focht\\Recent") 
--- snip ---

Regards
Comment 25 Kenneth 2014-03-05 21:32:26 UTC
.lnk bug still present running MS Office 2010 under WINE 1.7.13 

Adding "Recent" folder like this: ./wine/drive_c/users/username/Recent

seems to have cured the problem.
Comment 26 Anastasius Focht 2014-03-06 01:06:35 UTC
Hello Kenneth,

not sure if you have read and understood my last comment.

'$WINEPREFIX/drive_c/users/$USER/Recent' folder is automatically created upon prefix creation.
It won't be (re)created if you recycle an old prefix where this folder was missing or deliberately deleted this folder in a new prefix.
Create a clean (new!) prefix and check if the folder exists.
If not then your Wine build/package is broken.

WINEPREFIX=~/foo wineboot ; [[ -d ~/foo/drive_c/users/$USER/Recent ]] && echo "ok"

Regards
Comment 27 Kenneth 2014-03-06 08:07:16 UTC
Well, I got the problem resolved but WINE jargon kind of throws me, e.g.  "CSIDL_RECENT folder will be automatically created upon WINEPREFIX creation" 

If I understand the rest of the comment, it seems to suggest that I should do a fresh install of WINE (i.e. create a new WINEPREFIX) However I merely added the Recent folder manually and solved the problem

What is CSIDL? I've read up about WINEPREFIX and as near as I can tell it means one's WINE installation, which on my Mint laptop is found at ./wine in my HOME directory. From some comments here and from a brief experiment using Play On Linux it appears that WINE isn't necessarily installed in the same folder. I've not used Crossover but guess that the naming convention would be different there as well.

In any case, adding the Recent folder stopped scattering .lnk files everywhere and after a couple of tests the .lnk files are ending up in ./wine/drive_c/users/username/Recent

My comment above was simply to point out that until I created the folder the scattering of .lnk files was happening under my 1.7.13 installation of WINE. Now it is not. 

Thanks for help.

Ken
Comment 28 Rosanne DiMesio 2014-03-06 09:22:58 UTC
(In reply to Kenneth from comment #27)
> 
> If I understand the rest of the comment, it seems to suggest that I should
> do a fresh install of WINE (i.e. create a new WINEPREFIX) 

You are confusing installing Wine with creating a wineprefix. They are not the same thing at all. http://wiki.winehq.org/FAQ#wineprefix

If you need further help, ask on the forum.
Comment 29 Alexandre Julliard 2014-03-07 14:13:11 UTC
Closing bugs fixed in 1.7.14.
Comment 30 C. Leu 2023-03-04 11:25:42 UTC
Unfortunately this problem is again back in Wine 8.0 (stable).

When I open a *.xlsx file at the desktop and save it (with the same name) to an *.ods file then Excel 2010 will create two (useless) files. One is a *.lnk (which points to the original xlsx) and the other is a shortcut regarding the ods file but also with *.ods ending.

As mentioned, both of them are non-functional.
Comment 31 Austin English 2023-03-04 12:06:22 UTC
(In reply to C. Leu from comment #30)
> Unfortunately this problem is again back in Wine 8.0 (stable).
> 
> When I open a *.xlsx file at the desktop and save it (with the same name) to
> an *.ods file then Excel 2010 will create two (useless) files. One is a
> *.lnk (which points to the original xlsx) and the other is a shortcut
> regarding the ods file but also with *.ods ending.
> 
> As mentioned, both of them are non-functional.

Please open a new bug.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers