I stopped following Windows a few years ago so I do not know
what is going on, but that looks like it's part of the privilege
escalation security procedures in Windows. I suspect that since
gvim.exe is not signed, Windows runs it with some reduced
privilege and a fake view of certain directories (even if the
user is in Administrators).
John
I'm not a Windows programmer, but I understand there are special new
windows calls that will give the raw situation if the app really wants
it.
A couple of quick links:
http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365743(v=vs.85).aspx
...Stu
I say an option is the correct way; make 32-bit vim operate "normally"
but allow it to see past the redirection if that's needed.
...Stu
From http://www.vim.org/download.php#pc:
> Native 64-bit binaries for MS-Windows can be found at
> http://code.google.com/p/vim-win3264/. The Win32 binaries should run
> too, but the 64 bit version has a few minor advantages (see the web page
> at the link).
I guess avoiding the file system redirection is one of the "few minor
advantages" the text hints at. I've been using the 64-bit version on Windows 7
without problems. To me, this is too little of an issue (and, as this discussion
showed, it's already difficult to actually detect the proper underlying root
cause from the symptoms (blame Microsoft for that)) to warrant a special
implementation and option in 32-bit Vim.
-- regards, ingo
And at the link you find that there are a few disadvantages too:
- Command-line installer
- Not supported; not well tested.
Also, I prefer to get official vim.org releases.
> I guess avoiding the file system redirection is one of the "few minor
> advantages" the text hints at. I've been using the 64-bit version on
Possibly. It's not clear to me if 64-bit native apps see the whole raw
filesystem on 64-bit Windows, or if they see the 64-bit view of the
filesystem.
> Windows 7
> without problems. To me, this is too little of an issue (and, as this
Vim has many features, and I could say that all the ones I don't use
are too little of an issue to have been implemented. Nevertheless they
were. Ultimately, it's Bram's call. However, 32-bit vim cannot
interact with parts of the Win 64-bit filesystem without this. That
makes it worthwhile all by itself IMHO.
...Stu
> What if, instead of an option, we add an optional argument to
> system()? Or is that too weird, to have a Windows-only argument to a
> function?
Do we know of any plugins that break because of this, or is this a purely
theoretical case (well, except for the reported chcp.com) so far? All the
"common" ones do exist in both 32 and 64-bit versions (cmd.exe, cscript.exe, ...)
> I like this because the MS docs say the redirection should
> only be suppressed temporarily, and this would allow that. I don't
> like it because a user might want to use :! or :r !{cmd} instead of
> system(). But I don't think we normally want users to set the option
> and leave it set, unless they also tweak their path to search in the
> 32-bit directories along with the 64-bit ones.
Yes, turning off the redirection can cause issues with loading DLLs, as these
are then taken from the wrong directory and have the wrong bitness, so their
loading fails. As Vim is able to do this via libcall(), it is an issue, though
there are probably few to no users of this functionality.
> Actually I don't think it's a big issue on modern Windows systems. I'm
> on XP 64-bit. Starting with Windows Vista, supposedly you can use a
> special path alias to get to the non-redirected folders. Also, XP 64-
> bit is not widely used, and I imagine they've worked out some of the
> missing apps in the 32-bit folder with Vista and later. I don't like
> "you're out of luck if you don't use 64-bit Vim" but I suppose I can
> accept it if it works in Vista and later.
Right, you mean C:\Windows\Sysnative. Microsoft offers a hotfix that backports
this to Windows XP and 2003 (http://support.microsoft.com/kb/942589), but few
will have this installed, and documenting all these hoops is a real hassle.
-- regards, ingo
Speak of the devil. Since this thread I ran across
C:\Windows\System32\gatherNetworkInfo.vbs. Curious, I right-clicked,
"Edit with Vim" and received a blank file with the status line
'"C:\Windows\System32\gatherNetworkInfo.vbs" [New file]'. I can edit
the file by doing
:e C:\Windows\Sysnative\gatherNetworkInfo.vbs
Understandably, the Sysnative part does not auto-complete, but once I
got to the 'g' I could autocomplete the filename.
So there's one real-world case. I really think this needs to be noted
in the help, if nothing else.
...Stu