Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

Commit 4010163

Browse files
committed
Added a check for 86Box.exe in EXEdir
1 parent 983ee1b commit 4010163

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

86BoxManager/dlgSettings.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Microsoft.Win32;
22
using System;
3+
using System.IO;
34
using System.Windows.Forms;
45

56
namespace _86boxManager
@@ -59,7 +60,8 @@ private void btnOK_Click(object sender, EventArgs e)
5960

6061
private void txt_TextChanged(object sender, EventArgs e)
6162
{
62-
if (string.IsNullOrWhiteSpace(txtEXEdir.Text) || string.IsNullOrWhiteSpace(txtCFGdir.Text) || string.IsNullOrWhiteSpace(txtLaunchTimeout.Text))
63+
if (string.IsNullOrWhiteSpace(txtEXEdir.Text) || string.IsNullOrWhiteSpace(txtCFGdir.Text) ||
64+
string.IsNullOrWhiteSpace(txtLaunchTimeout.Text))
6365
{
6466
btnApply.Enabled = false;
6567
}
@@ -74,6 +76,10 @@ private void txt_TextChanged(object sender, EventArgs e)
7476
//Save the settings to the registry
7577
private void SaveSettings()
7678
{
79+
if (!File.Exists(txtEXEdir.Text + "86Box.exe") && !File.Exists(txtEXEdir.Text + @"\86Box.exe"))
80+
{
81+
MessageBox.Show("86Box.exe could not be found in the directory you specified. Make sure the path is correct or you won't be able to use any virtual machines.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
82+
}
7783
try
7884
{
7985
RegistryKey regkey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\86Box", true); //Try to open the key first (in read-write mode) to see if it already exists

0 commit comments

Comments
 (0)