Jump to content

How to execute .exe INDIRECTLY trough another .exe, .bat etc...


Recommended Posts

Hello,

I'd like to do the following... For example, I have a file "data.txt" and by double clicking on it I'd like to send the request to another .exe, .bat, or whatever and call/redirect to the "real" .exe from there.

In other words I'd like to execute the C:\Windows\system32\notepad.exe INDIRECTLY and of corse I'd like for ALL .txt files to open this way.

An example... I'm telling Josh to tell Joe I'm going to be late! :)

Thank you!

Edited by cplusdummy
Link to comment
Share on other sites


Hi jaclaz,

I did not describe why because the answers would deteriorate from the question and people would post suggestions trying to solve the issue from different angles. Once solved I promise I'll describe the source of the problem.

As for your answer, yes I know how to handle file associates in widows. It's just a matter of Right Click --> Open With --> Choose Program --> Tap on "Always use the selected program..." --> Select Program or browse to it...

The problem is I don't have "Josh" (see my previous post).

Link to comment
Share on other sites

Josh is his own person, unless he is a prisoner and you are a guard or the warden. It stands to reason that if Josh isn't with you, and you can't contact him, then you can't tell him anything.

Likewise, if we don't have an adequate grasp of the actual problem, there's no way we can tell you much of consequence.

Edited by 5eraph
Link to comment
Share on other sites

Josh is his own person, unless he is a prisoner and you are a guard or the warden. It stands to reason that if Josh isn't with you, and you can't contact him, then you can't tell him anything.

Likewise, if we don't have an adequate grasp of the actual problem, there's no way we can tell you much of consequence.

True, that's why I'm asking you or anybody here to bring him to me :)

No, seriously I need to setup .txt files to trigger the whatever.exe (which I don't have) and redirect the request to notepad.exe.

Link to comment
Share on other sites

Well, you could try setting it through a registry entry as Kai Liu has done for Notepad2.

You don't seem to understand my issue. I don't try to replace anything. I just want to run a .exe file indirectly. I DON'T HAVE the whatever.exe file! What I need to know is how to code a whatever.exe (or whatever.bat etc...) file that when it is called it calls another .exe file.

Edited by cplusdummy
Link to comment
Share on other sites

As long as TXT files are already associated with whatever.exe, and you have that registry entry, then you shouldn't need whatever.exe. In this case Windows is Josh, and Joe is Notepad. ;)

Edited by 5eraph
Link to comment
Share on other sites

I'm not going to swear by this, but I THINK that the OP want to somehow cause a TXT file to be "transmitted" to JOE via JOSH and "opened", very "similar" (stipulating with quotation marks) to the Windows Messaging System.

I'm telling Josh to tell Joe I'm going to be late

Question poser - WHY would you want an Intermediary for such a task? Is there a reason you can't "talk" to JOE directly? I see no purpose to "pushing" an EXE execution OP->JOSH->JOE unless the "purpose" is to run "whatever.exe" on JOE without JOE knowing it was the OP.

Sorry, but this is a REALLY strange "method" request and (no offense) smells a bit "fishy". Could you elaborate the purpose of this? Your first example doesn't square with

I need to setup .txt files to trigger the whatever.exe (which I don't have) and redirect the request to notepad.exe
YOU have the TXT file and want IT to "trigger" JOSH "whatever.exe" to "trigger" JOE "NOTEPAD.EXE" to display YOUR "TXT" on JOE??? Very odd! Just IM JOE, bearing in mind Windows Messaging is a favorite Service used by Spammers.

http://en.wikipedia.org/wiki/Windows_Messenger_service

which references

http://en.wikipedia.org/wiki/Microsoft_Messenger_service

Link to comment
Share on other sites

YOU have the TXT file and want IT to "trigger" JOSH "whatever.exe" to "trigger" JOE "NOTEPAD.EXE" to display YOUR "TXT" on JOE???

E X A C T L Y!!! At last....

There is nothing fishy to it because I know this can be done simple. As I promised I'll tell you what is it for once solved. I just want to save myself from answers such as "why don't you try this and that instead...".

For example, I'm a PHP developer. I can call test.php indirectly by including it to info.php and calling http://www.example.com/info.php. I don't know why is this so hard to understand.

It does not have to be strictly a .exe file. I want to know how to call notepad.exe when double clicking on a .txt trough a second .exe, .bat or whatever...

Link to comment
Share on other sites

Dude, here's your problem. Websites (and building a website) have Local or Remote (e.g. WWW) methods of "linking". I can see no way to "link into" ANOTHER person's PC the ANOTHER person's PC except via Remote (even if it's a Locally Connected PC).

You're looking at this from the perspective of the Web (as you say PHP coder). What you're asking for would be along the lines of a "hacker's delight". IOW, I defy you to do that by ANY means to my PC via My Brother's PC (who lives in the next state) unless I personally Initiated DIRECTLY from HIS PC after HE initiated from YOURS, all Remotely, understand (see last sentence)?

Bottom line - good luck to you as I see it as an "impossible task" UNLESS you write PROGRAM that can COMMUNICATE between the three (You, Josh, and Joe) AND the Firewall/Antivirus would ALLOW it (depending on the software). Routers act in the same way - BLOCKING certain In-Ports unless specifically opened. You're talking DIRECT TCP Communications and RUNNING a Program on a Remote. Consider this - HOW do you think "installing" an ActiveX works? The concept you want to conceptually achieve is the same. NOW also consider an IM program that TWO (or more) persons can Communicate with. THAT is essentially what you're asking for except via "script kiddie" methods, correct?

You LITERALLY need Open-ended "Read/Write" Access via TCP/IP between all three, TRANSMITTING to the Intermediary which would TRANSMIT to the END and RUN a Program to READ it.

Again, good luck!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...