Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Need data displayed in a Inputbox or msgbox...

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,537
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need data displayed in a Inputbox or msgbox...
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Need data displayed in a Inputbox or msgbox... - 12/18/2001 1:33:22 PM   
  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.
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need data displayed in a Inputbox or msgbox... Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts