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_FACTOR = 1048576
Set objWMIService = GetObject("winmgmts://102.223.141.126")
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:' ")
FreeMegaBytes = objLogicalDisk.FreeSpace / CONVERSION_FACTOR
Wscript.Echo "There are " & Int(FreeMegaBytes) & _
" megabytes of free disk space on IP address 126."
C#( ASP.NET ) code:
protected void Button1_Click1(object sender, EventArgs e)
{
Process.Start(Server.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........