Hi I'm trying to write a simple HTA file that a user can click on a get all types of handy info. e.g MAC, IP, Computer Name and how much space there my documents they have used.
The thing is that there my documents has been re-directed to a network share, I tried the below script, but it will only work on a root drive.
Does anyone have any ideas,
Cheers,
Johan
The thing is that there my documents has been re-directed to a network share, I tried the below script, but it will only work on a root drive.
Code:
Const MY_DOCUMENTS = &H5&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_DOCUMENTS)
Set objFolderItem = objFolder.Self
Set colDiskQuotas = CreateObject("Microsoft.DiskQuota.1")
'WScript.Echo objFolderItem.Path & "\"
'\\bob-fs-a.vcom.local.\User$\UserName\
colDiskQuotas.Initialize objFolderItem.Path & "\", True
For Each objUser in colDiskQuotas
Wscript.Echo "Logon name: " & objUser.LogonName
Wscript.Echo "Quota used: " & objUser.QuotaUsed
Next
Does anyone have any ideas,
Cheers,
Johan