Chris2k Posted March 17, 2013 Share Posted March 17, 2013 HiCan somebody see where i'm going wrong:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace ImportantChanges{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { try { string txt = System.IO.File.ReadAllText(@"./Start/PostInstall.txt"); foreach (string line in System.IO.File.ReadAllLines(txt)) { string[] txtLine = line.Split(':'); if (txtLine[0].ToLower() == "prog name") label3.Text = "Installing " + txtLine[1]; if (txtLine[0].ToLower() == "installer file") try { System.Diagnostics.Process.Start(txtLine[1]); } catch { MessageBox.Show("Error: File doesn't exist" + txtLine[1]); } } // try { System.Diagnostics.Process.Start(@"./PostInstall.cmd"); } // catch { Console.WriteLine("Error: File doesn't exist or is damaged!"); } } catch { MessageBox.Show("Sorry can't install this program!"); } } }}I'm getting that laast message box everytime, Why?HERE's the txt file:##############################################################################Install Order: 1Prog Name: RocketDock v1.3.5Installer File: H:\X17-59183\-=Build Stuff=-\Silent\RocketDock135_Cusom_Silent_Chris2k.exe##############################################################################thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.