mirror of
https://github.com/modmii/modmii.github.io.git
synced 2024-12-29 01:21:55 +01:00
642e92e879
Updated md5 hash and sysCheck Updater recognition for v1.0 of the HackMii Installer. A big thanks goes out to Team Twiizers for this unexpected update. settings.exe was updated to v1.1 by obcd (v1.0 by cwstjdenobs). setting.txt's built for an Emulated NAND of one region but based on a different region's serial number will now also be able to establish a wifi connection. Added an option to change the setting.txt to ModMii's Emulated NAND Modifier. This will allow you to modify an Emulated NAND to be able to establish a wifi connection when running on a different real Wii. Fixed bug that only occurred when running ModMii Skin on Windows XP and it would not wait for ModMii Classic to finish running before reporting the Download Log. Thanks to person66 for his revisions to ModMii's Launcher (aka shortcut-er). Fixed bug where drag and drop support did not work when items were dragged into ModMii.bat and ModMiiSkin.bat. This bug did not apply when items were dragged onto ModMii.exe and ModMiiSkin.exe. Other Minor Changes.
68 lines
2.5 KiB
C#
68 lines
2.5 KiB
C#
using System.Diagnostics;
|
|
using System.Windows.Forms;
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
//Launcher written by person66
|
|
|
|
namespace ModMii_Launcher
|
|
{
|
|
class Program
|
|
{
|
|
[DllImport("kernel32.dll")]
|
|
static extern bool FreeConsole();
|
|
[DllImport("kernel32.dll")]
|
|
static extern bool AllocConsole();
|
|
[DllImport("kernel32.dll")]
|
|
static extern bool AttachConsole(uint dwProcessId);
|
|
[DllImport("User32.dll")]
|
|
public static extern Int32 SetForegroundWindow(int hWnd);
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
if (args.Length <= 0)
|
|
{
|
|
Process[] processes = Process.GetProcessesByName("cmd");
|
|
foreach (Process x in processes)
|
|
{
|
|
FreeConsole();
|
|
AttachConsole(Convert.ToUInt16(x.Id));
|
|
if (Console.Title == "ModMii")
|
|
AlreadyOpen(args);
|
|
}
|
|
processes = Process.GetProcessesByName("WizApp");
|
|
foreach (Process x in processes)
|
|
{
|
|
if (x.MainWindowTitle == "ModMii Skin")
|
|
AlreadyOpen(args);
|
|
}
|
|
}
|
|
FreeConsole();
|
|
AllocConsole();
|
|
SetForegroundWindow(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle.ToInt32());
|
|
RunApp(args);
|
|
}
|
|
|
|
private static void AlreadyOpen(string[] args)
|
|
{
|
|
DialogResult msg = MessageBox.Show("It appears as if you already have a ModMii Window open.\n\nRunning more than one instance of ModMii at a time is not\nrecommended and may get buggy.\n\nAre you sure you wish to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
|
|
if (msg == DialogResult.No)
|
|
Environment.Exit(0);
|
|
}
|
|
|
|
private static void RunApp(string[] args)
|
|
{
|
|
Console.Title = "ModMii";
|
|
Process p = new Process();
|
|
p.StartInfo.FileName = Environment.GetEnvironmentVariable("COMSPEC");
|
|
p.StartInfo.Arguments = " /c call " + "\"" + Application.StartupPath + "/Support/ModMii.bat\" " + string.Join(" ", args);
|
|
p.StartInfo.WorkingDirectory = Application.StartupPath + "/Support/";
|
|
p.StartInfo.UseShellExecute = false;
|
|
p.Start();
|
|
if (args.Length > 0)
|
|
{
|
|
p.WaitForExit();
|
|
}
|
|
}
|
|
}
|
|
} |