Esempio n. 1
0
        private void forceToggle(object sender, RoutedEventArgs e)
        {
            var currepourl = ConfigManager.fetch("ArmA3", "repourl");

            string[]         modlist = downloader.webReadLines(currepourl + "modlist.cfg");
            MessageBoxResult result  = MessageBox.Show("This will delete your mods and redownload them are you sure?", "You 100% sure?", MessageBoxButton.YesNo);

            switch (result)
            {
            case MessageBoxResult.Yes:
                string msg = "Removed mods";
                forceButton.Content = msg;
                forceButton.Width   = 90;
                string a3path = regcheck.arma3RegCheck();
                foreach (string modline in modlist)
                {
                    try
                    {
                        if (Directory.Exists(a3path + "\\" + modline))
                        {
                            logIt.addData("Deleted " + modline);
                            Directory.Delete(a3path + "\\" + modline, true);
                        }
                    }
                    catch (IOException) { }
                }
                break;

            case MessageBoxResult.No:

                break;
            }
        }
Esempio n. 2
0
        public static string ts3RegCheck()
        {
            string line = ConfigManager.fetch("ArmA3", "ts3Dir");

            if (line == "")
            {
                String value = (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ts3file\shell\open\command", null, null);
                if (value != null)
                {
                    char[] trimChars = { '\"', '\\', '%', '1', ' ' };
                    value = value.Trim(trimChars);
                    string[] remove = { @"\ts3client_win64.exe", @"\ts3client_win32.exe" };
                    foreach (string removeinput in remove)
                    {
                        if (value.EndsWith(removeinput))
                        {
                            value = value.Substring(0, value.IndexOf(removeinput));
                            break;
                        }
                    }

                    ConfigManager.write("ArmA3", "ts3Dir", value);
                    return(value);
                }
                else
                {
                    return(line);
                }
            }
            else
            {
                return(line);
            }
        }
Esempio n. 3
0
        void initializeValues()
        {
            if (ConfigManager.fetch("ArmA3", "window") == "true")
            {
                window.IsChecked = true;
            }
            else
            {
                window.IsChecked = false;
            }

            if (ConfigManager.fetch("ArmA3", "nosplash") == "true")
            {
                nosplash.IsChecked = true;
            }
            else
            {
                nosplash.IsChecked = false;
            }

            if (ConfigManager.fetch("ArmA3", "skipIntro") == "true")
            {
                skipIntro.IsChecked = true;
            }
            else
            {
                skipIntro.IsChecked = false;
            }

            if (ConfigManager.fetch("ArmA3", "noLogs") == "true")
            {
                noLogs.IsChecked = true;
            }
            else
            {
                noLogs.IsChecked = false;
            }

            if (ConfigManager.fetch("ArmA3", "noPause") == "true")
            {
                noPause.IsChecked = true;
            }
            else
            {
                noPause.IsChecked = false;
            }

            if (ConfigManager.fetch("ArmA3", "showScriptErrors") == "true")
            {
                showScriptErrors.IsChecked = true;
            }
            else
            {
                showScriptErrors.IsChecked = false;
            }

            world.Text        = ConfigManager.fetch("ArmA3", "world");
            customParams.Text = ConfigManager.fetch("ArmA3", "customParameters");
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            string input  = ConfigManager.fetch("repoGen", "inputDir");
            string output = ConfigManager.fetch("repoGen", "outputDir");

            //If configfile is blank make input arma 3 path, else make input from config file.
            if (input == "")
            {
                input = regcheck.arma3RegCheck();
            }
            inputDir_textBox.Text = input;

            //If config file is blank make it arma3path+\Slick Updater RepoGen, else make input configfile
            if (output == "")
            {
                output = regcheck.arma3RegCheck() + "\\Slick Updater RepoGen";
            }
            outputDir_textBox.Text = output;
        }
Esempio n. 5
0
        public static string arma3RegCheck()
        {
            string line = ConfigManager.fetch("ArmA3", "path");

            if (line == "")
            {
                String value = (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Bohemia Interactive\Arma 3", "MAIN", null);
                if (value != null)
                {
                    ConfigManager.write("ArmA3", "path", value);
                    return(value);
                }
                else
                {
                    return(line);
                }
            }
            else
            {
                return(line);
            }
        }
Esempio n. 6
0
        public static void inputGen()
        {
            string dirPath = ConfigManager.fetch("repoGen", "inputDir");

            if (dirPath != "")
            {
                BitmapImage            modRed    = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Slick Updater Beta;component/Resources/modGreen.png"));
                List <modSourceFolder> modSource = new List <modSourceFolder>();

                DirectoryInfo   dir        = new DirectoryInfo(dirPath);
                DirectoryInfo[] tempSubDir = dir.GetDirectories();

                foreach (DirectoryInfo i in tempSubDir)
                {
                    string fullName = i.FullName;
                    Uri    uri      = new Uri(fullName);
                    string name     = Path.GetFileName(uri.LocalPath);
                    if (name.Substring(0, 1) == "@")
                    {
                        string version     = "1";
                        string versionFile = fullName + "\\SU.version";
                        if (File.Exists(versionFile))
                        {
                            string[] linesRead = File.ReadAllLines(versionFile);
                            version = linesRead[0];
                        }
                        modSource.Add(new modSourceFolder()
                        {
                            modFolderName = name, modVersion = version
                        });
                    }
                }
                List <modSourceFolder> outputSource = new List <modSourceFolder>();
                WindowManager.mainWindow.outputDirListBox.ItemsSource = outputSource;
                WindowManager.mainWindow.inputDirListBox.ItemsSource  = modSource;
            }
        }
Esempio n. 7
0
        private static void generate(object sender, DoWorkEventArgs e)
        {
            bw1.DoWork -= generate;
            BitmapImage modRed   = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Slick Updater Beta;component/Resources/modGreen.png"));

            DataGrid listView = WindowManager.mainWindow.outputDirListBox;

            string        outputDir     = ConfigManager.fetch("repoGen", "outputDir");
            DirectoryInfo outputDirInfo = new DirectoryInfo(outputDir);

            if (!Directory.Exists(outputDir))
            {
                Directory.CreateDirectory(outputDir);
            }

            outputDirInfo.Delete(true);



            Directory.CreateDirectory(outputDir);
            using (StreamWriter modsw = new StreamWriter(outputDir + "\\modlist.cfg", true)) {
                for (int i = 0; i < listView.Items.Count; i++)
                {
                    modSourceFolder modSource        = listView.Items.GetItemAt(i) as modSourceFolder;
                    string          modFolderName    = modSource.modFolderName;
                    string          modVersionNumber = modSource.modVersion;
                    string          inputDir         = ConfigManager.fetch("repoGen", "inputDir");
                    if (Directory.Exists(inputDir))
                    {
                        string inputModDir = inputDir + "\\" + modFolderName;
                        //genFile(inputModDir);
                        DirectoryInfo dir = new DirectoryInfo(inputModDir);
                        if (dir.Exists)
                        {
                            modsw.WriteLine(modFolderName);
                            //Create output Directory if it doesn't exist.
                            //Create modfolder in outputdir if it doesn't exits
                            if (!Directory.Exists(outputDir + "\\" + modFolderName))
                            {
                                Directory.CreateDirectory(outputDir + "\\" + modFolderName);
                            }
                            string fileCfgPath = outputDir + "\\" + modFolderName + "\\files.cfg";
                            using (StreamWriter sw = new StreamWriter(fileCfgPath, true)) {
                                foreach (FileInfo fileInfo in dir.GetFiles())
                                {
                                    if (fileInfo.Name != "SU.version")
                                    {
                                        string name     = fileInfo.Name;
                                        string path     = fileInfo.FullName;
                                        string zipName  = name + ".7z";
                                        string zipPath  = outputDir + "\\" + modFolderName + "\\" + zipName;
                                        string hashPath = outputDir + "\\" + modFolderName + "\\" + name + ".hash";
                                        File.WriteAllText(hashPath, md5Calc(path));
                                        //string[] temp = {path, zipPath};
                                        //queue.Enqueue(temp);
                                        Zippy.compress(path, zipPath);
                                        sw.WriteLine(name);
                                    }
                                }
                            }
                            string dirCfgPath = outputDir + "\\" + modFolderName + "\\dirs.cfg";
                            using (StreamWriter sw = new StreamWriter(dirCfgPath, true)) {
                                foreach (DirectoryInfo directory in dir.GetDirectories())
                                {
                                    string sourcePath = directory.FullName;
                                    string sourceName = directory.Name;
                                    string outDir     = outputDir + "\\" + modFolderName + "\\" + sourceName;
                                    genFile(sourcePath, outDir);
                                    genDir(sourcePath, outDir);
                                    sw.WriteLine(sourceName);
                                }
                            }
                            File.WriteAllText(outputDir + "\\" + modFolderName + "\\SU.version", modVersionNumber);
                            DirectoryInfo source      = new DirectoryInfo(inputDir + "\\" + modFolderName);
                            FileInfo[]    sourceFiles = source.GetFiles("*", SearchOption.AllDirectories);
                            File.WriteAllText(outputDir + "\\" + modFolderName + "\\count.txt", sourceFiles.Length.ToString());
                        }
                    }
                }
            }
        }
Esempio n. 8
0
        private void LaunchAndJoin(object sender, RoutedEventArgs e)
        {
            var server = ConfigManager.fetch("ArmA3", "currentrepo");

            Launch.a3Launch(true, server);
        }
Esempio n. 9
0
        public MainWindow()
        {
            InitializeComponent();
            logThread = new logIt();
            repoHide();
            FileStream   fs = new FileStream("localversion", FileMode.Create, FileAccess.Write);
            StreamWriter sw = new StreamWriter(fs);

            sw.WriteLine(slickVersion);
            sw.Close();
            menuAnimation(140, 0);
            showRepo        = false;
            rawslickServVer = downloader.webRead("http://projectawesomemodhost.com/beta/repo/slickupdater/slickversion");
            slickServVer    = rawslickServVer.Split('%');

            MenuItem pa = new MenuItem();

            pa.Tag    = "http://projectawesomemodhost.com/beta/repo/";
            pa.Header = "PA Repo";
            items.Add(pa);
            if (slickServVer[0] != slickVersion)
            {
                MessageBoxResult result = MessageBox.Show("There seems to be a new version of slickupdater available, do you wanne update it it?", "New Update", MessageBoxButton.YesNo);
                switch (result)
                {
                case MessageBoxResult.Yes:
                    System.Diagnostics.Process.Start("SlickAutoUpdate.exe");
                    System.Diagnostics.Process.GetCurrentProcess().Kill();
                    break;

                case MessageBoxResult.No:

                    break;
                }
            }

            // Initialize Update Worker
            worker                       = new BackgroundWorker();
            worker.DoWork               += worker_DoWork;
            worker.ProgressChanged      += worker_ProgressChanged;
            worker.WorkerReportsProgress = true;
            worker.RunWorkerCompleted   += worker_RunWorkerCompleted;

            //init checkWorker
            checkWorker                       = new BackgroundWorker();
            checkWorker.DoWork               += checkWorker_DoWork;
            checkWorker.ProgressChanged      += checkWorker_ProgressChanged;
            checkWorker.WorkerReportsProgress = true;
            checkWorker.RunWorkerCompleted   += checkWorker_RunWorkerCompleted;

            //reddit worker
            redditWorker                     = new BackgroundWorker();
            redditWorker.DoWork             += redditWorker_DoWork;
            redditWorker.RunWorkerCompleted += redditworker_Done;

            WindowManager.SetWnd(this);

            //Test if config is up to date
            if (File.Exists("config.xml"))
            {
                XDocument testdoc = XDocument.Load("config.xml");
                if (testdoc.Element("SlickUpdater").Element("ArmA3").Element("repourl") == null)
                {
                    File.Delete("config.xml");
                }
            }
            //Grenerate config xml
            if (!File.Exists("config.xml"))
            {
                MessageBox.Show("Hello! This seems to be the first time you launch SlickUpdater so make sure your arma 3 and ts3 path is set correctly in options. Have a nice day!", "Welcome");
                XDocument doc = new XDocument(
                    new XComment("Slick Updater config.xml File!"),
                    new XElement("SlickUpdater",
                                 new XElement("ArmA3",
                                              new XElement("path", ""),
                                              new XElement("window", "false"),
                                              new XElement("nosplash", "true"),
                                              new XElement("skipIntro", "true"),
                                              new XElement("noLogs", "false"),
                                              new XElement("noPause", "true"),
                                              new XElement("showScriptErrors", "false"),
                                              new XElement("world", ""),
                                              new XElement("customParameters", ""),
                                              new XElement("ts3Dir", ""),
                                              new XElement("repourl", "http://projectawesomemodhost.com/beta/repo/"),
                                              new XElement("currentrepo", "PA Repo")),
                                 new XElement("ArmA2"),
                                 new XElement("repoGen",
                                              new XElement("inputDir", ""),
                                              new XElement("outputDir", "")),
                                 new XElement("Client",
                                              new XElement("FirstTimeLaunch", "true"))));
                doc.Save("config.xml");
            }
            //Check if the user if a PA user or a TEST user
            a3DirText.Text     = regcheck.arma3RegCheck();
            ts3DirText.Text    = regcheck.ts3RegCheck();
            menuButton.Content = ConfigManager.fetch("ArmA3", "currentrepo");
            var subredd = ConfigManager.fetch("ArmA3", "currentrepo");

            if (subredd == "PA Repo")
            {
                subreddit          = "/r/ProjectMilSim";
                joinButton.Content = "Join PA server";
            }
            else if (subredd == "Test Outfit Repo")
            {
                subreddit          = "/r/testoutfit";
                joinButton.Content = "Join TEST server";
            }
        }
Esempio n. 10
0
        static private void checkFilesFolders(string folder)
        {
            string relativePath = folder.Replace(arma3Path, "");

            string[] files = downloader.webReadLines(url + relativePath + "/files.cfg");

            DirectoryInfo info = new DirectoryInfo(folder);

            string[] dirs = downloader.webReadLines(url + relativePath + "\\dirs.cfg");

            foreach (DirectoryInfo dirInfo in info.GetDirectories())
            {
                bool exists = false;
                foreach (string dir in dirs)
                {
                    if (dir == dirInfo.Name)
                    {
                        exists = true;
                    }
                }
                if (!exists)
                {
                    dirInfo.Delete(true);
                }
            }

            foreach (string dir in dirs)
            {
                DirectoryInfo dirInfo = new DirectoryInfo(folder + "\\" + dir);
                if (!dirInfo.Exists)
                {
                    dirInfo.Create();
                }
                checkFilesFolders(dirInfo.FullName);
            }

            foreach (FileInfo file in info.GetFiles())
            {
                bool exists = false;
                foreach (string fileString in files)
                {
                    if (file.Name == fileString)
                    {
                        exists = true;
                    }
                }
                if (exists == false)
                {
                    file.Delete();
                }
            }

            foreach (string file in files)
            {
                FileInfo fileInfo = new FileInfo(folder + "\\" + file);
                if (fileInfo.Exists)
                {
                    string hash           = RepoGenerator.md5Calc(fileInfo.FullName);
                    string downloadedHash = downloader.webRead(url + relativePath + "\\" + fileInfo.Name + ".hash");
                    if (hash != downloadedHash)
                    {
                        downloader.download(url + relativePath + "\\" + fileInfo.Name + ".7z");
                        Unzippy.extract(fileInfo.Name + ".7z", fileInfo.DirectoryName);
                        increment();
                        File.Delete(fileInfo.Name + ".7z");
                    }
                }
                else
                {
                    downloader.download(url + relativePath + "\\" + fileInfo.Name + ".7z");
                    Unzippy.extract(fileInfo.Name + ".7z", fileInfo.DirectoryName);
                    increment();
                    File.Delete(fileInfo.Name + ".7z");
                }
            }

            if (info.Name == "plugin")
            {
                //Now Create all of the directories
                foreach (string dirPath in Directory.GetDirectories(info.FullName, "*",
                                                                    SearchOption.AllDirectories))
                {
                    Directory.CreateDirectory(dirPath.Replace(info.FullName, ConfigManager.fetch("ArmA3", "ts3Dir") + "\\plugins"));
                }

                //Copy all the files
                foreach (string newPath in Directory.GetFiles(info.FullName, "*.*", SearchOption.AllDirectories))
                {
                    if (!File.Exists(newPath.Replace(info.FullName, ConfigManager.fetch("ArmA3", "ts3Dir") + "\\plugins")))
                    {
                        try {
                            File.Copy(newPath, newPath.Replace(info.FullName, ConfigManager.fetch("ArmA3", "ts3Dir") + "\\plugins"), true);
                            logIt.addData("Copied ACRE plugin to TS3 folder");
                        } catch (Exception e) {
                            WindowManager.mainWindow.worker.ReportProgress(-1, e.Message);
                            logIt.addData("Failed to copy ACRE plugin to TS3 folder. Error Message: " + e.Message);
                        }
                    }
                }
            }

            if (info.Name == "userconfig")
            {
                string output = arma3Path + "\\userconfig";
                Directory.CreateDirectory(output);

                foreach (string dirPath in Directory.GetDirectories(info.FullName, "*",
                                                                    SearchOption.AllDirectories))
                {
                    Directory.CreateDirectory(dirPath.Replace(info.FullName, output));
                }

                foreach (string newPath in Directory.GetFiles(info.FullName, "*.*",
                                                              SearchOption.AllDirectories))
                {
                    try {
                        File.Copy(newPath, newPath.Replace(info.FullName, output), true);
                    } catch (Exception e) {
                        WindowManager.mainWindow.worker.ReportProgress(-1, e.Message);
                    }
                }
            }
        }
Esempio n. 11
0
        public static void arma3UpdateCheck()
        {
            string mod;
            int    index;

            string[] mods;
            string   modFolder;
            string   versionFile;
            string   versionString;
            string   version0String;
            string   xmlLine      = ConfigManager.fetch("ArmA3", "repourl");
            string   slickVersion = downloader.webRead("http://projectawesomemodhost.com/beta/repo/slickupdater/slickversion");

#if DEBUG
            xmlLine = "http://localhost/repo/";
#endif
            string[] parsedslickVersion = slickVersion.Split('%');
            if (xmlLine != "")
            {
                url = xmlLine;
            }
            else
            {
                MessageBox.Show("Your repourl is not set. Go into settings and change it! Setting it to default!");
                url = parsedslickVersion[2];
                ConfigManager.write("ArmA3", "repourl", parsedslickVersion[2]);
            }


            BitmapImage modRed    = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Slick Updater Beta;component/Resources/modGreen.png"));
            BitmapImage modBlue   = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Slick Updater Beta;component/Resources/modBrown.png"));
            BitmapImage modYellow = new BitmapImage(new Uri(@"pack://application:,,,/Slick Updater Beta;component/Resources/modYellow.png"));
            List <Mod>  a3Items   = new List <Mod>();
            try {
                mods = downloader.webReadLines(url + modlist);
            } catch (WebException e) {
                WindowManager.mainWindow.checkWorker.ReportProgress(-1, e.Message);
                return;
            }
            bool date = true;
            foreach (string modline in mods)
            {
                index = modline.IndexOf("#");
                if (index != 0)
                {
                    if (index != -1)
                    {
                        mod = modline.Substring(0, index);
                    }
                    else
                    {
                        mod = modline;
                    }
                    modFolder      = arma3Path + "\\" + mod;
                    versionFile    = arma3Path + "\\" + mod + "\\SU.version";
                    version0String = downloader.webRead(url + "/" + mod + "/" + "SU.version");
                    if (Directory.Exists(modFolder))
                    {
                        if (File.Exists(versionFile))
                        {
                            versionString = File.ReadAllText(versionFile);
                            if (versionString == version0String)
                            {
                                modGreen.Freeze();
                                a3Items.Add(new Mod()
                                {
                                    status = modGreen, modName = mod, version = "v. " + versionString, servVersion = "v. " + version0String
                                });
                                logIt.addData(mod + " is up to date.");
                                //MessageBox.Show(mod + " is up to date.");
                            }
                            else
                            {
                                modYellow.Freeze();
                                a3Items.Add(new Mod()
                                {
                                    status = modYellow, modName = mod, version = "v. " + versionString, servVersion = "v. " + version0String
                                });
                                date = false;
                                //MessageBox.Show(mod + " is out of date.");
                                logIt.addData(mod + " is out to date.");
                            }
                        }
                        else
                        {
                            modBrown.Freeze();
                            a3Items.Add(new Mod()
                            {
                                status = modBrown, modName = mod, version = "No file", servVersion = "v. " + version0String
                            });
                            date = false;
                            //MessageBox.Show(mod + " is missing a version file.");
                            logIt.addData(mod + " is missing a version file.");
                        }
                    }
                    else
                    {
                        modBlue.Freeze();
                        a3Items.Add(new Mod()
                        {
                            status = modBlue, modName = mod, version = "No file", servVersion = "v. " + version0String
                        });
                        //File.Delete(versionFile);
                        date = false;
                        //MessageBox.Show(mod + " doesn't exist on your computer.");
                        logIt.addData(mod + " doesn't exist on your computer.");
                    }
                }
            }
            if (date == true)
            {
                WindowManager.mainWindow.checkWorker.ReportProgress(1, "Launch ArmA 3");
            }
            else
            {
                WindowManager.mainWindow.checkWorker.ReportProgress(1, "Update ArmA 3");
            }
            WindowManager.mainWindow.checkWorker.ReportProgress(2, a3Items);
        }
Esempio n. 12
0
        public static void a3Update()
        {
            if (url == "")
            {
                url = ConfigManager.fetch("ArmA3", "repourl");
            }

            string arma3Path = regcheck.arma3RegCheck();
            string mod;

            string[] mods;
            string   modFolder;
            string   versionString  = "";
            string   version0String = "";

            mods = downloader.webReadLines(url + modlist);
            int i = 0;

            foreach (string modline in mods)
            {
                i++;
                int index = modline.IndexOf("#");
                if (index != 0)
                {
                    if (index != -1)
                    {
                        mod = modline.Substring(0, index);
                    }
                    else
                    {
                        mod = modline;
                    }
                    modFolder = arma3Path + "\\" + mod;
                    if (Directory.Exists(modFolder))
                    {
                        string versionFile  = arma3Path + "\\" + mod + "\\" + "SU.version";
                        string version0File = "SU.version";
                        if (File.Exists(versionFile))
                        {
                            versionString  = File.ReadAllText(versionFile);
                            version0String = downloader.webRead(url + mod + "\\" + version0File);
                            logIt.addData("Fetched versionfile from server version is " + versionString);
                            File.Delete(version0File);
                            if (versionString == version0String)
                            {
                                //a3Items.Add(new Mod() { status = modGreen, modName = mod });
                                //MessageBox.Show(mod + " is up to date.");
                            }
                            else
                            {
                                //a3Items.Add(new Mod() { status = modYellow, modName = mod });
                                //MessageBox.Show(mod + " is out of date.");
                                a3DetailUpdate(mod);
                            }
                        }
                        else
                        {
                            //a3Items.Add(new Mod() { status = modBrown, modName = mod });
                            //MessageBox.Show(mod + " is missing a version file.");
                            version0String = downloader.webRead(url + mod + "\\" + version0File);
                            MessageBoxResult result = MessageBox.Show("SlickUpdater have detected that you have the folder " + modFolder + " if your 100% sure this is up to date you don't have to re-download. \n\nAre you sure this mod is up to date?", "Mod folder detacted", MessageBoxButton.YesNo);
                            switch (result)
                            {
                            case MessageBoxResult.Yes:
                                File.WriteAllText(modFolder + "\\SU.version", version0String);
                                break;

                            case MessageBoxResult.No:
                                a3DetailUpdate(mod);
                                break;
                            }
                        }
                    }
                    else
                    {
                        //a3Items.Add(new Mod() { status = modBlue, modName = mod });
                        //MessageBox.Show(mod + " doesn't exist on your computer.");
                        a3DetailUpdate(mod);
                    }
                }
                double status = (double)i / (double)mods.Length;
                WindowManager.mainWindow.worker.ReportProgress((int)(status * 100) + 202);
            }
        }
Esempio n. 13
0
        static public void a3Launch(bool connectToServer, string server)
        {
            string arma3Path    = regcheck.arma3RegCheck() + "\\arma3.exe";
            string world        = ConfigManager.fetch("ArmA3", "world");
            string customParams = ConfigManager.fetch("ArmA3", "customParameters");
            string mods         = modlister();

            string args = "";

            if (ConfigManager.fetch("ArmA3", "window") == "true")
            {
                args += " -window";
            }
            if (ConfigManager.fetch("ArmA3", "nosplash") == "true")
            {
                args += " -nosplash";
            }
            if (ConfigManager.fetch("ArmA3", "skipIntro") == "true")
            {
                args += " -skipIntro";
            }
            if (ConfigManager.fetch("ArmA3", "noLogs") == "true")
            {
                args += " -noLogs";
            }
            if (ConfigManager.fetch("ArmA3", "noPause") == "true")
            {
                args += " -noPause";
            }
            if (ConfigManager.fetch("ArmA3", "showScriptErrors") == "true")
            {
                args += " -showScriptErrors";
            }
            if (connectToServer == true)
            {
                if (server == "PA Repo")
                {
                    args += " -port=2302 -connect=216.155.136.19 -password=PA";
                }
                else if (server == "Test Outfit Repo")
                {
                    args += " -port=2302 -connect=72.5.102.119 -password=scott";
                }
            }
            if (world != "")
            {
                if (world == "demwaffels")
                {
                    System.Diagnostics.Process.Start("http://www.youtube.com/watch?v=8W5WdS7q3ns");
                    return;
                }
                else
                {
                    args += " -world=" + world;
                }
            }
            if (customParams != "")
            {
                args += " " + customParams;
            }
            if (mods != "")
            {
                args += " -mod=" + mods;
            }

            Process.Start(arma3Path, args);
            logIt.addData("Launched Arma 3 with " + args);
        }