| |
imav8n
Posts: 95
Score: 0
Joined: 7/3/2001
From: USA
Status: offline
|
Hi all, I've got a script that goes to a specified server, gets information about a file and the remaining drive space, then displays that data as a message box. The problem, is that I can't cut/paste from a message box. I'm trying to display the information using an inputbox, with the data being displayed in the "input" portion, but I'm limited to a single line and I need multiple lines. Here's the code with the message box: -------------------------------------- On Error Resume Next Set WshShell = Wscript.CreateObject("Wscript.shell") Set Wshfile = Wscript.CreateObject("Scripting.FileSystemObject") Set objArgs = WScript.Arguments strServer = objArgs(0) strDrive = objArgs(1) If strDrive = "" Then strDrive = "M" End If IF strServer = "" THEN strServer = inputbox("What server?") End If strRemoteShare = ("\\" & strServer & "\" & strDrive & "$") If Wshfile.DriveExists(strRemoteShare) Then Set RemoteDrive = wshfile.getdrive(strRemoteShare) DriveSpace = Round(RemoteDrive.AvailableSpace/1024^3, 3) Set DITFile = wshfile.GetFile(strRemoteShare & "\NTDS\NTDS.DIT") DITSize = Round(DITFile.size/1024^3,3) msgbox "Information for Server: " & strServer & vbcrlf & "-----------------------------------------" & vbcrlf & _ "Free Space: " & DriveSpace & " GB" & vbcrlf & "DIT Size: " & DITSIZE & " GB" & vbcrlf Else wscript.echo strRemoteShare & " does not exist" End if ----------------------------- Thanks! ~imav8n Failure is not an option.....it comes bundled with the software.
|
|