Click here to Skip to main content
15,896,348 members
Articles / Web Development / IIS

Bitsup - Server Upload Utility Using BITS

Rate me:
Please Sign up or sign in to vote.
4.70/5 (21 votes)
25 Jun 20056 min read 96.8K   674   75  
A file upload utility that uses BITS as the transfer engine.
Public Class cShell

    Public Shared Function GetProcessText(ByVal process As String, ByVal param As String, ByVal workingDir As String) As String
        Dim p As Process = New Process
        ' this is the name of the process we want to execute 
        p.StartInfo.FileName = process
        If Not (workingDir = "") Then
            p.StartInfo.WorkingDirectory = workingDir
        End If
        p.StartInfo.Arguments = param
        ' need to set this to false to redirect output
        p.StartInfo.UseShellExecute = False
        p.StartInfo.RedirectStandardOutput = True
        ' i dislike cmd windows popping up...
        p.StartInfo.CreateNoWindow = True
        ' start the process 
        p.Start()
        ' read all the output
        ' here we could just read line by line and display it
        ' in an output window 
        Dim output As String = p.StandardOutput.ReadToEnd
        ' wait for the process to terminate 
        p.WaitForExit()
        Return output
    End Function

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior) Texas Woman's University
United States United States
I wrote my first program when I was a child - Basic on the TRS-80 used line numbers back then. I enjoy the problem solving and creative process that writing software invokes.

Comments and Discussions