FileSystemObjects GetDrive() - VBScript runtime er

Results 1 to 2 of 2

Thread: FileSystemObjects GetDrive() - VBScript runtime er

  1. #1
    Join Date
    Dec 1969

    Default FileSystemObjects GetDrive() - VBScript runtime er

    I am currently having problems of getting the network share specification of a different server which is on the same network as the NT Server I&#039;m developing on.<BR><BR>-------------- Example1: -------------<BR><BR>I have used the following example code: <BR><BR>Dim drvPath<BR><BR>&#039;These lines are rem&#039;d for changing of the drive source<BR>REM drvPath = "D:wwwroot\"<BR>REM drvPath = "V:DirectoryName"<BR>drvPath = "\ServerNameDirectoryName"<BR><BR>Set d = objFSO.GetDrive(objFSO.GetDriveName(drvPath))<BR>< BR>s = "Drive " & UCase(drvPath) & " - " <BR>s = s & d.VolumeName & "<BR>"<BR>s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0) <BR>s = s & " Kbytes" <BR>ShowFreeSpace = s<BR><BR>Response.Write ShowFreeSpace<BR><BR>----------------------------------------<BR><BR>The above code works if it is a local drive (example: D:wwwroot) on the NT Server.<BR><BR><BR>I have mapped the network drive of Server1 (on the same network/workgroup) on to the NTServer2 which I am developing on (which executes the ASP code), and have called it drive V: and have set the permission on the server1 to allow NTServer2 read/write access.<BR><BR>I have managed (in a small bit of code) to list the number of Drives on the NTserver2 using the object: <BR><BR>objFSO.Drives<BR><BR>The mapped drive called V: shows up on the list of existing drives.<BR><BR>I have used the above (example1) code to get the volume size of the V: mapped network drive and keep on getting an error message(shown below) when drive V: is read<BR><BR><BR>Microsoft VBScript runtime error &#039;800a0047&#039; <BR><BR>Drive not ready<BR><BR><BR><BR>I am pretty confident that it is an NT Admin task... and that it is something to do with the setup of the permission settings on the server that I&#039;m trying to get access to. <BR><BR>Any ideas or any solution on why the above happens would be greatly appreciated.<BR><BR><BR>Yours Gratefully,<BR>Simon

  2. #2
    Join Date
    Dec 1969

    Default RE: FileSystemObjects GetDrive() - VBScript runtim

    Have you checked the NTFS file permission in IIS, as the permissions need to be set to allow the NTServer to communicate with the Server you want to connect to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts