how to get the value returned by runing this script in textbox or label of HTML page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • balach
    New Member
    • Sep 2008
    • 18

    how to get the value returned by runing this script in textbox or label of HTML page

    hi dear,

    some body please guide me in this problem that,i am using the following "vbscript" to get the free space of "C" Drive in Megabytes. when i copy this code and save as "Diskspace. vbs" then scipt file will be created as like "Mydisk.vbs ". the following is vbscript code.

    vbscript code:

    Const CONVERSION_FACT OR = 1048576
    Set objWMIService = GetObject("winm gmts://102.223.141.126 ")
    Set objLogicalDisk = objWMIService.G et("Win32_Logic alDisk.DeviceID ='c:'")
    FreeMegaBytes = objLogicalDisk. FreeSpace / CONVERSION_FACT OR
    Wscript.Echo "There are " & Int(FreeMegaByt es) & _
    " megabytes of free disk space on IP address 126."



    C#( ASP.NET ) code:

    protected void Button1_Click1( object sender, EventArgs e)
    {

    Process.Start(S erver.MapPath(" ~/Mydisk.vbs" ));
    }

    when i run that script file through C# code, on button click event, an alert message open,asking that "There are 45213 Megabyte of free disk space on IP address 126."

    Now what i require, i want that when the file name "Mydisk.vbs " is got fire then, with out prompting alert message that value should be assigned to label or textbox of that HTML page.

    Now, how could i assign the value returned by script to textbox of web page??

    please some body arrange this vbscript code to get the value in label or textbox, not as alert message as it is generated by script.

    please some coding hints........
    Last edited by balach; Oct 20 '08, 04:07 AM. Reason: wrong entry
Working...