Class ShellUtils

Windows specific shell utility functions

System.Object
  Westwind.Utilities.ShellUtils
public static class ShellUtils : object

Class Members

MemberDescription

ExecuteProcess

Executes a Windows process with given command line parameters

public static int ExecuteProcess(string executable,     string arguments,     int timeoutMs,     ProcessWindowStyle windowStyle)

public static int ExecuteProcess(string executable,     string arguments,     int timeoutMs,     ref StringBuilder output,     ProcessWindowStyle windowStyle)

public static int ExecuteProcess(string executable,     string arguments,     int timeoutMs,     Action writeDelegate,     ProcessWindowStyle windowStyle)

GoUrl

Uses the Shell Extensions to launch a program based on URL moniker or file name Basically a wrapper around ShellExecute

public static int GoUrl(string url)

HttpGet

Simple method to retrieve HTTP content from the Web quickly

public static string HttpGet(string url)

public static string HttpGet(string url,     ref string errorMessage)

HttpGetBytes

Retrieves a buffer of binary data from a URL using a plain HTTP Get.

public static Byte[] HttpGetBytes(string url)

public static Byte[] HttpGetBytes(string url,     ref string errorMessage)

OpenFileInExplorer

Opens a File or Folder in Explorer. If the path is a file Explorer is opened in the parent folder with the file selected

public static void OpenFileInExplorer(string filename)

OpenTerminal

Opens a Terminal window in the specified folder

public static bool OpenTerminal(string folder,     TerminalModes mode)

ShowHtml

Shows a string as HTML

public static int ShowHtml(string htmlString)

ShowString

Displays a string in in a browser as HTML. Optionally provide an alternate extension to display in the appropriate text viewer (ie. "txt" likely shows in NotePad)

public static int ShowString(string text,     string extension)

ShowText

Displays a large Text string as a text file in the systems' default text viewer (ie. NotePad)

public static int ShowText(string TextString)

Requirements

Namespace: Westwind.Utilities
Assembly: westwind.utilities.dll

© West Wind Technologies, 2019 • Updated: 06/23/19
Comment or report problem with topic