Board index » Visual Studio » Syntax for listing drive letter

Syntax for listing drive letter

Visual Studio5
On the Microsoft site the following script is supposed to list the drive

letter assigned for a user's home drive:



On Error Resume Next



Set objUser = GetObject

("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")

Wscript.Echo "Home Drive: " & objUser.HomeDrive





When I run this script I get the error:



Microsoft VBScript runtime error: Object doesn't support this property or

method: 'objUser.HomeDrive'



Anyone know the correct syntax?


-
 

Re:Syntax for listing drive letter

Comment out the "On Error Resume Next" statement first to see what the

actual problem is...



"Phill prescott" <pap@choa.org>wrote in message

Quote
On the Microsoft site the following script is supposed to list the drive

letter assigned for a user's home drive:



On Error Resume Next



Set objUser = GetObject

("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")

Wscript.Echo "Home Drive: " & objUser.HomeDrive





When I run this script I get the error:



Microsoft VBScript runtime error: Object doesn't support this property or

method: 'objUser.HomeDrive'



Anyone know the correct syntax?









-