Homebrew [Release] SimpliiU

What do you want to see in Future Updates?


  • Total voters
    83

Dr.Hacknik

Ashley | Developer | Trans
OP
Member
Joined
Mar 26, 2014
Messages
1,773
Trophies
1
Age
24
Location
inside your fridge
Website
dochacknik.keybase.pub
XP
2,219
Country
United States
Oh damn I didn't thought to add the possibilty to change the clusters.
Here's some code i came up with:

Code:
ManagementObject disk = SD
ManagementObject("SELECT * FROM Win32_Volume WHERE Name = 'SDCARD'");
disk.Get();
disk.InvokeMethod("Format", new object[] {"FAT", false, 64, "TheLabel", false});

EDIT:

Use's WMI.
 
Last edited by Dr.Hacknik,

HoloryTV

Well-Known Member
Member
Joined
Feb 25, 2016
Messages
163
Trophies
0
Age
26
XP
146
Country
France
Working fine this way by the way :

Code:
if (flatCheckBox7.Checked == true)
            {
                System.Diagnostics.Process process = new System.Diagnostics.Process();
                System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
                startInfo.FileName = "cmd.exe";
                startInfo.Arguments = "/C" + "FORMAT " + flatComboBox1.Text + "/Y /FS:FAT32 /A:64k /V:Wii /Q";
                process.StartInfo = startInfo;
                process.Start();
                process.WaitForExit();        
            }

--------------------- MERGED ---------------------------

Added 32k or 64k clusters options as radiobutton :

146310a11b574d92b64586a6bf43f4b9.png


Code:
        private void flatButton3_Click(object sender, EventArgs e)
        {
            if (flatCheckBox7.Checked == true)
            {
                if (radioButton1.Checked == true)
                {
                    System.Diagnostics.Process process = new System.Diagnostics.Process();
                    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
                    startInfo.FileName = "cmd.exe";
                    startInfo.Arguments = "/C" + "FORMAT " + flatComboBox1.Text + "/Y /FS:FAT32 /A:32k /V:Wii /Q";
                    process.StartInfo = startInfo;
                    process.Start();
                    process.WaitForExit();
                }
                else
                {
                    System.Diagnostics.Process process = new System.Diagnostics.Process();
                    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
                    startInfo.FileName = "cmd.exe";
                    startInfo.Arguments = "/C" + "FORMAT " + flatComboBox1.Text + "/Y /FS:FAT32 /A:64k /V:Wii /Q";
                    process.StartInfo = startInfo;
                    process.Start();
                    process.WaitForExit();
                }
            }


Yes my code sucks, I will start to learn to dev the 3 years coming at school
 
Last edited by HoloryTV,
  • Like
Reactions: Dr.Hacknik

Dr.Hacknik

Ashley | Developer | Trans
OP
Member
Joined
Mar 26, 2014
Messages
1,773
Trophies
1
Age
24
Location
inside your fridge
Website
dochacknik.keybase.pub
XP
2,219
Country
United States
/C or /K to make cmd to be able to "understand" your arguments

/C Run Command and then terminate

/K Run Command and then return to the CMD prompt.
This is useful for testing, to examine variables

What i've got:

Code:
if (Properties.Settings.Default.sd_form == "1")
            {
                lbl_content.Text = "Formating SD Card...";
                System.Diagnostics.Process process = new System.Diagnostics.Process();
                System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
                startInfo.FileName = "cmd.exe";
                startInfo.Arguments = "/C" + "FORMAT " + sd + "/Y /FS:FAT32 /A:64k /V:Wii_U /Q";
                process.StartInfo = startInfo;
                process.Start();
                process.WaitForExit();
                lbl_content.Text = "Formating Completed...";
            }
            else
            {
            }
 

HoloryTV

Well-Known Member
Member
Joined
Feb 25, 2016
Messages
163
Trophies
0
Age
26
XP
146
Country
France
It looks nice we have the same code :D
I should add a label or MessageBox to tell users that everything is done
 
Last edited by HoloryTV,

HoloryTV

Well-Known Member
Member
Joined
Feb 25, 2016
Messages
163
Trophies
0
Age
26
XP
146
Country
France
Might as well use your method, it seems easier. No DLL Importing either.
Hope you don't mind!
No problem my project will be open-source I am glad to help someone !

--------------------- MERGED ---------------------------

To avoid more dll like ZipLibrary I use :

Code:
System.IO.Compression.ZipFile.ExtractToDirectory(@"HOMEBREW_PATH", "SD_PATH);

--------------------- MERGED ---------------------------

So I am tired.
Thanks for the discussion was fun.
If you need help I will be there.
Have a nice day buddy.
 
  • Like
Reactions: Dr.Hacknik

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: @SylverReZ, Indeed lol