Tuesday, September 25, 2012

E484 temporary file when using system() Win 7 64-bit

New machine, I used to run this code all the time and have never had a problem with it.

Would like a little back ground on how system() calls work.

:ver
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 25 2012 13:13:52)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-672

I am this call:
let output = system('cscript.exe')

That results in:
E484: Can't open file C:\Users\i826639\AppData\Local\Temp\VIoDA9D.tmp

I have verified this directory exists:
C:\Users\i826639\AppData\Local\Temp

I can do this successfully:
:e C:\Users\i826639\AppData\Local\Temp\VIoDA9D.tmp
:w

So Vim has full write access to this directory.

I assume system() is creating a temporary file to capture the output from the system call and would most likely be storing this in a temporary file. Then setting the variable = to the contents.

From cmd.exe I can run:
C:\>cscript.exe
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Usage: CScript scriptname.extension [option...] [arguments...]

Options:
//B Batch mode: Suppresses script errors and prompts from displaying
//D Enable Active Debugging
//E:engine Use engine for executing script
//H:CScript Changes the default script host to CScript.exe
//H:WScript Changes the default script host to WScript.exe (default)
//I Interactive mode (default, opposite of //B)
//Job:xxxx Execute a WSF job
//Logo Display logo (default)
//Nologo Prevent logo display: No banner will be shown at execution time
//S Save current command line options for this user
//T:nn Time out in seconds: Maximum time a script is permitted to run
//X Execute script in debugger
//U Use Unicode for redirected I/O from the console

In fact, what I have it actually run (from the system call), completes successfully, it just seems Vim's capture of the output is what appears to be failing.

Is anyone else seeing this behaviour?
Any ideas on what I might do to capture more information on what could help isolate the issue further?

Thanks,
Dave


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: