im making an application loader which will allow you do have as many applications as you want saved in it, say for example you want to have Google Chrome in it, you press "add application" and you get an OpenFileDialog to select Chrome or any other app/program you want. the program then saves the path and name in .bin files and should load it when you click the button. it successfully loads websites but not applications, and the reason for that i think is that the program saves the file paths as
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
instead of
C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
at least thats what i think. anyway here's the code for "save" and "load":
Save:
if (metroTextBox1.Text == "" || metroTextBox2.Text == "")
{
MessageBox.Show("You have to fill in both Name and Path first", "Invalid Info", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
string[] name = { metroTextBox1.Text };
string[] path = { metroTextBox2.Text };
System.IO.File.WriteAllLines(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/appLoader/apps/appname1.bin", name);
System.IO.File.WriteAllLines(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/appLoader/apps/apppath1.bin", path);
}
Load:
try
{
string path = System.IO.File.ReadAllText(System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/appLoader/apps/apppath1.bin");
Process.Start(path);
}
catch
{
}