I have an exe that I want to be able to run from a number of machines that do not have PGP Command Line installed. Currently when I try and run the exe it returns the error 2713:No License has been entered. This is correct as I ran another exe from same machine using --version --verbose. I am using PGP Command Line 10.3.2 on a MS2008-R2 server. The exe was created in VS2010. I am not a programmer so any sniggers at the code below are taken on the chin. Is there a way that I can make this work. Any help or suggestions much apprecaited.
public
Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
folderBrowserDialog1.SelectedPath =
@"C:\_jo";
folderBrowserDialog1.Description =
"Please choose a location";
folderBrowserDialog1.ShowDialog();
Process startProcess = new Process();
ProcessStartInfo startPGP = new ProcessStartInfo(@"\\ukstaxbt\c$\Program Files\PGP Corporation\PGP Command Line\pgp.exe");
startPGP.RedirectStandardOutput =
true;
startPGP.UseShellExecute =
false;
startProcess.StartInfo = startPGP;
startPGP.WindowStyle =
ProcessWindowStyle.Normal;
// string pgpArgs = @"pgp –-public-keyring C:\Temp\aa_a1_a3.pkr –e –r C:\_jo\ar123456.a1 –output C:\_jo\ar123456.pgp";
string pgpArgs = @"--home-dir <C:\pgptest> --encrypt jh.txt --recipient aa_a1_a3.pkr --status-file status.log";// > status.log";
startPGP.Arguments = pgpArgs;
startProcess.Start();
// startProcess.WaitForExit();
string output = startProcess.StandardOutput.ReadToEnd();
File.WriteAllText("VSstatus.log", output);
}
}
}