using PWAppUpdater; namespace PWAppUpdater2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void progressBar1_Click(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { Directory.SetCurrentDirectory("C:\\PWAPP"); label1.Text = "Updating.... Please wait."; label1.Update(); progressBar1.Maximum = 8; progressBar1.Step = 1; button1.Enabled = false; try { PWAppUpdater.Updater.Update("C:\\PWAPP\\App", progressBar1, StepInfo, "C:\\PWAPP\\Temp"); } catch (NoAuthException) { MessageBox.Show("Please run the updater with administrator privilages or from the PWApp Application."); Application.Exit(); } MessageBox.Show("Done!"); Application.Exit(); } private void label1_Click(object sender, EventArgs e) { } private void label2_Click(object sender, EventArgs e) { } } }