What's new

Solved How to launch XEX through JRPCv2

Jakerxiii

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
Points
55
Sin$
0
I've been looking for a while now on a way to launch an XEX through JRPCv2 without the use of XBDM. I would like to avoid the open windows explorer way. I'm using C#; any help would be appreciated, thanks :smile:
 
Snowy

Snowy

Let it snow
Hidden Devils
Messages
2,605
Solutions
2
Reaction score
917
Points
790
Sin$
0
This method works well but requires a slight modification to JRPC to work.
I'll explain why first.

This method works by sending the XBDM command "magicboot" to the console via JRPC's "SendCommand" function. However, by default, this is a privately accessible function, meaning it can only be accessed from within the JRPC class, which we are not, so I modified the DLL to make it publicly accessible. Feel free to look through the DLL in DnSpy or whatever if you would like.

It is used like this.
Code:
bool bootXEX(IXboxConsole xrube, string xexpath, string xexdir) //first parameter can be omitted if you like
        {
            string XEX = "\"" + xexpath + "\""; //add "" around the path, to prevent errors with paths including white spaces
            string DIR = "\"" + xexdir + "\""; //add "" around the path, to prevent errors with paths including white spaces
            string resp = JRPC.SendCommand(xrube, "magicboot Title=" + XEX + " Directory=" + DIR + "\r\n"); //concatenate parameters
            if (!(resp.Contains("202")) || resp.Contains("203")) //check if it worked
                return false; //return false if it didn't work
            return true; //return true if it did
        }

Download / [Click here to view this link] / Virus Total
 
Jakerxiii

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
Points
55
Sin$
0
Thankyou, both of you. These methods are helpful and although I'm probably going to use Snowy's method I appreciate the alternatives. Thanks for the help and fast replies :smile:
 
Snowy

Snowy

Let it snow
Hidden Devils
Messages
2,605
Solutions
2
Reaction score
917
Points
790
Sin$
0
Thankyou, both of you. These methods are helpful and although I'm probably going to use Snowy's method I appreciate the alternatives. Thanks for the help and fast replies :smile:
I haven't actually tested the code, it should work though. If it doesn't and this thread has been locked PM me, otherwise please reply on this thread :smile: (so anyone can see it).
 
ImOx

ImOx

(^._.^)ノ
Retired
Programmer MotM Platinum Record
Messages
9,961
Reaction score
2,963
Points
2,180
Sin$
0
I haven't actually tested the code, it should work though. If it doesn't and this thread has been locked PM me, otherwise please reply on this thread :smile: (so anyone can see it).
That is the correct command, so yeah it works.
Or well, didn't look what's inside that library, but assuming it's all good.

EDIT: what's with the carriage return + linefeed at the end of the command though?
What is its use supposed to be?
 
Jakerxiii

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
Points
55
Sin$
0
I haven't actually tested the code, it should work though. If it doesn't and this thread has been locked PM me, otherwise please reply on this thread :smile: (so anyone can see it).

I can't thank you enough. The code seems to have worked and I didn't even realise it was possible to poke around in a DLL, let alone recompile! I am forever grateful :smile:
 
Jakerxiii

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
Points
55
Sin$
0
I haven't actually tested the code, it should work though. If it doesn't and this thread has been locked PM me, otherwise please reply on this thread :smile: (so anyone can see it).

That is the correct command, so yeah it works.
Or well, didn't look what's inside that library, but assuming it's all good.

EDIT: what's with the carriage return + linefeed at the end of the command though?
What is its use supposed to be?

As an example, how would the path/xex file be formatted? I had it working but it seemed very unpredictable and I can't remember for the life of me how I had them. Many thanks :smile:
 
ImOx

ImOx

(^._.^)ノ
Retired
Programmer MotM Platinum Record
Messages
9,961
Reaction score
2,963
Points
2,180
Sin$
0
As an example, how would the path/xex file be formatted? I had it working but it seemed very unpredictable and I can't remember for the life of me how I had them. Many thanks :smile:
Don't really understand what you mean.
What exactly is it that you're having trouble with?
 
Snowy

Snowy

Let it snow
Hidden Devils
Messages
2,605
Solutions
2
Reaction score
917
Points
790
Sin$
0
That is the correct command, so yeah it works.
Or well, didn't look what's inside that library, but assuming it's all good.

EDIT: what's with the carriage return + linefeed at the end of the command though?
What is its use supposed to be?
Eh, I can't 100% remember but I was fairly certain all XBDM commands needed to end with "\r\n", so I added it, but idk if JRPC does that anyways.

As an example, how would the path/xex file be formatted? I had it working but it seemed very unpredictable and I can't remember for the life of me how I had them. Many thanks :smile:
Sorry forgot to include examples.
XEX would be like this:
Code:
Hdd:\somedir\somexex.xex
and the directory would be like this:
Code:
Hdd:\somedir\
 
Jakerxiii

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
Points
55
Sin$
0
Eh, I can't 100% remember but I was fairly certain all XBDM commands needed to end with "\r\n", so I added it, but idk if JRPC does that anyways.


Sorry forgot to include examples.
XEX would be like this:
Code:
Hdd:\somedir\somexex.xex
and the directory would be like this:
Code:
Hdd:\somedir\

Thankyou, I have it working again. JRPC automatically adds \r\n so it's not needed, thankyou for the help everybody :smile: :smile: :smile:
 
Top Bottom
Login
Register