Added comment line parameter for COMPUTERNAME.

This commit is contained in:
Vinay Pamnani 2017-10-05 21:24:14 -04:00
parent 3cda183090
commit c14b0ad2ad
3 changed files with 13 additions and 0 deletions

View file

@ -1,6 +1,7 @@
Version 2.0.0.2 [10-05-2017]
* Migration to GitHub.
* Added option to specify COMPUTERNAME as a parameter and automatically connect, Example: WmiExplorer.exe COMPUTERNAME.
Version 2.0.0.0 [10-27-2014]

View file

@ -1746,6 +1746,17 @@ namespace WmiExplorer
SetStatusBar2(String.Empty, MessageCategory.Error);
}
private void ProcessCommandLineArgs()
{
string[] args = Environment.GetCommandLineArgs();
if (args.Length == 2)
{
textBoxComputerName.Text = args[1].ToString();
buttonComputerConnect.PerformClick();
}
}
private void PopulateClassProperties(WmiClass wmiClass)
{
ResetListClassProperties();

View file

@ -1618,6 +1618,7 @@ namespace WmiExplorer
private void WmiExplorer_Load(object sender, EventArgs e)
{
InitializeForm();
ProcessCommandLineArgs();
}
}
}