When I try to launch my program with a shortcut or Process.Start it is running my if's saying that my files are missing and it is not launching the WPF windows. The picture below is what I am trying to launch via shortcut/process.start
if (!File.Exists(Environment.CurrentDirectory + "\\Multimanager.dll") && !File.Exists(Environment.CurrentDirectory + "\\Multimanager.dll"))
{
MessageBox.Show("You are missing the 'Multimanager.dll' and the 'Updater.dll'. Please re-run the MMInstaller.exe to re-download these files", "Missing files", MessageBoxButton.OK, MessageBoxImage.Warning);
Application.Current.Shutdown();
}
else if (!File.Exists(Environment.CurrentDirectory + "\\Multimanager.dll"))
{
MessageBox.Show("You are missing the 'Multimanager.dll'. Please re-run the MMInstaller.exe to re-download these files", "Missing files", MessageBoxButton.OK, MessageBoxImage.Warning);
Application.Current.Shutdown();
}
else if (!File.Exists(Environment.CurrentDirectory + "\\Updater.dll"))
{
MessageBox.Show("You are missing the 'Updater.dll'. Please re-run the MMInstaller.exe to re-download these files", "Missing files", MessageBoxButton.OK, MessageBoxImage.Warning);
Application.Current.Shutdown();
}
else
{
string MMV = Multimanager.MMShared.version().ToString();
string UV = Updater.UShared.version().ToString();
var u = new Updater.UpdaterWPF(MMV);
u.ShowDialog();
var mm = new Multimanager.UUpdater(UV);
mm.Show();
u.Close();
}
Edit: If I launch the program manually with the .exe it opens fine

Aucun commentaire:
Enregistrer un commentaire