What's new

Solved How to launch XEX through JRPCv2

J

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
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:
 
S

Shoe

♛COTM July 2016♛
Messages
3,288
Reaction score
1,817
Cakes or I ImOx will know, they way i would do it is make a games launcher then add the path to the game then lauch it with a button.
 
S

Snowy

Let it snow
Messages
2,604
Reaction score
913
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
 
J

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
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:
 
S

Snowy

Let it snow
Messages
2,604
Reaction score
913
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).
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,961
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?
 
J

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
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:
 
J

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
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:
 
I

ImOx

(^._.^)ノ
Retired
Messages
9,968
Reaction score
2,961
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?
 
S

Snowy

Let it snow
Messages
2,604
Reaction score
913
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\
 
J

Jakerxiii

Enthusiast
Messages
50
Reaction score
3
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