in reply to Unavailable network drives in CGI scripts

Your CGI script is probably running under the localsystem or another account local to the Web server.

This account has priviledges on the local system, but NOT on the network. It does not allow you to use mapped drives or other networked resources.

Since you did not specify IIS, Apache, or other web server, I cannot advise on how to configure the CGI context. There are Win32 system calls that your CGI script can make, to impersonate different user identity. You can also make Win32 calls to get the network information, without running a separate command process, as you are trying to do.

     "A closed mouth gathers no feet." --Unknown

  • Comment on Re: Unavailable network drives in CGI scripts

Replies are listed 'Best First'.
Re^2: Unavailable network drives in CGI scripts
by ikegami (Patriarch) on Dec 13, 2006 at 17:42 UTC

    It does not allow you to use mapped drives or other networked resources.

    Then how do you explain the OP's ability to execute dir \\\\computername\\sharename successfully?