Need Software!

Status
Not open for further replies.

Jrwhar

Beta member
Messages
5
Hi everyone, i'll just get straight to the point. I need the name of a disk analysis program, that runs on widows, and has three unique features.
* Command Line Switching
* An executable that doesn't need to be installed.
* And ability to report via e-mail
Thank You very much in advanced. Any help would be greatly appreciated!!!:big_grin:
 
Have computers in our network send reports when disk space is low and just every once in a while so we can see what we need to delete.
 
See if one of these will work and then we will work on the email function

Code:
Option Explicit
Dim iSpc, strComputer, objWMIService
Dim fso, fsHandle, MyShell,LogFileName, colItems, objItem
Set MyShell = CreateObject("Wscript.Shell")
Set fso = Wscript.CreateObject("Scripting.FilesystemObject")
LogFileName= MyShell.SpecialFolders("Desktop") & "\FreeSpace.txt"
set fsHandle = fso.OpenTextFile (LogFileName,8,True)

strComputer = "."
Set objWMIService = GetObject _
( "winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_LogicalDisk Where DriveType = 3")

For Each objItem in colItems 
'Retrieve free space & convert from uint64
iSpc = cDbl(iSpc) + cDbl(objItem.FreeSpace)
Next

iSpc= iSpc/1024
iSpc= iSpc/1024
iSpc= iSpc/1024
iSpc= FormatNumber(iSpc,1)

'To capture the Date & Time, use "Now" function instead of "Date"
fsHandle.Writeline Date & " -- " & iSpc & " GB Free space"
fsHandle.Writeblanklines 1
fsHandle.close
set MyShell = Nothing
set fso = Nothing

or

Code:
Option Explicit
Dim iSpc, strComputer, objWMIService
Dim fso, fsHandle, MyShell,LogFileName, colItems, objItem
Set MyShell = CreateObject("Wscript.Shell")
Set fso = Wscript.CreateObject("Scripting.FilesystemObject")
LogFileName= MyShell.SpecialFolders("Desktop") & "\FreeSpace.txt"
set fsHandle = fso.OpenTextFile (LogFileName,8,True)

fsHandle.Writeline Date
fsHandle.Writeblanklines 1
strComputer = "."
Set objWMIService = GetObject _
( "winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_LogicalDisk Where DriveType = 3")

For Each objItem in colItems 
'Retrieve free space & convert from uint64
iSpc = cDbl(objItem.FreeSpace)
fsHandle.Writeline objItem.DeviceID & " - " _
& FormatiSpc(iSpc) & " GB free"
Next

Function FormatiSpc(intSpace) 
  intSpace = intSpace/1024
  intSpace = intSpace/1024
  intSpace = intSpace/1024
  intSpace= FormatNumber(intSpace,1)
  FormatiSpc = intSpace
end function

fsHandle.Writeblanklines 2
fsHandle.close
set MyShell = Nothing
set fso = Nothing

Save it as diskspace.vbs after you have copied it to notepad
 
Thank you so much but my boss says it wont work, he'd rather a legitimate program.
 
Thank you. Im not sure we'll use this program but I'll ask my boss. Thanks for all your help so far.
 
We already have a system of that stuff we just need a simple program, Im checking out Xinorbis right now, that's more what were looking for. But I do appreciate your help so far.
 
Status
Not open for further replies.
Back
Top Bottom