Jump to content

Recommended Posts

Posted

Hello, i tried to use the code of Zoey76 on c++ which application for purpose is to open l2.bin.using that IP parameter in the shellexecute won't work at all, at least not when I'm using L2.exe in the command. using L2.bin I'm always prompted to choose an application to open it with

 

#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define NOMINMAX
#include <iostream>
#include <windows.h>
#include <cstdlib>

using namespace std;

// Start L2 as .bin with IP as parameter.
// You can use IP or DNS as IP parameter.
// You could include other parameters.
// You can change the path to the .bin file to avoid including the L2.exe inside the System folder.
// Author: Zoey76
int _stdcall wWinMain(HINSTANCE hInst, HINSTANCE prevInst, LPWSTR szCmdLine, int nCmdShow)
{
    ShellExecute(0, L"open", L"cmd.exe", L"/C C:\Program Files (x86)\Lineage II\system start l2.bin IP=127.0.0.1", 0, SW_HIDE);
    system("PAUSE");
}

 

 

Posted (edited)

@eressea Because my goals are differents.

 When i'm trying to open l2.bin with command prompt i get message with i need to choose application which i open the l2.bin it's not normal. Do you know another way to started l2.bin file?

Edited by vladislavl2a
Posted

Is there way to start .bin file ? Why i get everytime message with choosing application? I can only start l2_start.exe that calls l2.exe to start the game(l2.bin).Is there a way to run l2.bin file by command prompt or another program?

Posted

its your windows specific problem, most prolly .bin file isn't defaulted as executable - you can run assoc command in cmd and check if says .bin=exefile

more on that: https://www.maketecheasier.com/change-file-associations-windows10/

 

but in your case, you can run l2.bin via cmd file to avoid that problem at all (my previous post), just keep in mind use of IP= argument can be disabled in l2.ini, also not sure if its even available in older chronicles, used it on GOD+ clients only.

Posted (edited)

Doesn't work. Everytime when i send message by cmd "start l2.bin IP=127.0.0.1" or "start l2.bin" i get message "Access denied" even with an administrator in cmd and futhermore i get message by windows 10 "The application is not compatible with your computer". Perhaps the problem is windows 10, can anyone tell me if this is the problem? In my case .bin format can't be executable.

And one more when i check .bin=exefile with command "assoc", i just don't see anywhere .bin or .bin=exefile or otherwise.

Edited by vlladislav45
assoc command
  • Sad 1
Posted (edited)

Just run cmd.exe (not PowerShell crap) as administrator and start l2.bin from there lol.

Edit: nvm, this works on windows versions below 1809... windows ruined another thing yet again.

Edited by Nik

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...