Jump to content

Recommended Posts

Posted

Hi

Can 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...