private bool AutoFindPuttyPathsInDir(string installdir)
{
if (!installdir.EndsWith("\\"))
installdir += "\\";
if (!File.Exists(PlinkPath.Text))
{
if (File.Exists(installdir + "plink.exe"))
PlinkPath.Text = installdir + "plink.exe";
}
if (!File.Exists(PlinkPath.Text))
{
if (File.Exists(installdir + "TortoisePlink.exe"))
PlinkPath.Text = installdir + "TortoisePlink.exe";
}
if (!File.Exists(PuttygenPath.Text))
{
if (File.Exists(installdir + "puttygen.exe"))
PuttygenPath.Text = installdir + "puttygen.exe";
}
if (!File.Exists(PageantPath.Text))
{
if (File.Exists(installdir + "pageant.exe"))
PageantPath.Text = installdir + "pageant.exe";
}
if (File.Exists(PlinkPath.Text) && File.Exists(PuttygenPath.Text) && File.Exists(PageantPath.Text))
return true;
else
return false;
}