|
hey every one...i have a prob.....i am making a program which will generate an exe...i want when i run my program....it should make a text file which is not a problem and one exe file...which is some other program that i built......not the same as the program from which im making this exe....what should i do for that??? i just had a random idea in my mind...i though every file is a file...why not try like text file..so i changed the extension of the exe(that i want to generate by running other one i.e. exe that i want to produce) in txt...then copied that into fputs("all the converted file contents here", outfile)....then tried to run...changed all escape seqence and all( like " changed to \" )...but didn't work as i expected....i knw its a very lame idea.... ...can someone tell me how to do this....any idea guys??/
there are 10 type of people in the world...
01 who understand binary.
10 who don't...
|
|
|
|
|
I don't understand you binary.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
ROTFL, particularly when OP replied. I guess you were asking about the question.
modified on Friday, May 9, 2008 11:35 AM
|
|
|
|
|
Indeed.
I suppose he/she is very young.
[added]Rajkumar R wrote: I guess you were asking about the question.
Of course you guessed well (maybe our binaries match better).
[/added]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
actually im making a keylogger using windows keyboard hook....keylogger is working very well....it has two files one is executable and other is dll file....what i want is to make an executable file which when run generates these two files and copies it somewhere let say windows directory....and makes an entry in registry to load at startup...now making registry is not a problem...problem is how do i make a single exe file which generates these two files( dll and keylogger.exe).....a guy in this post told me to include that exe in my project which will be extracted when i run that project....don't knw how to do that...thats my question...help?????
there are 10 type of people in the world...
01 who understand binary.
10 who don't...
|
|
|
|
|
At least this is my personal point of view.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
i got help for keylogger from your website only....
there are 10 type of people in the world...
01 who understand binary.
10 who don't...
|
|
|
|
|
CPallini wrote: I suppose he/she is very young.
How can you understand s(he) is young? it was other secrect that you found it.
|
|
|
|
|
It's my fully powered CPMRU , you know.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
modified on Friday, May 9, 2008 3:19 PM
|
|
|
|
|
But what is CPMRU?
|
|
|
|
|
C ode P roject M ind R eader U nit (first appeared in a David Crow reply, if I recall well).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
You can include the executable to be created as a resource into your project and extract it at run time.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
ohhh cool...thanx...can you give me a little more detail or give me a link to read...
there are 10 type of people in the world...
01 who understand binary.
10 who don't...
|
|
|
|
|
|
Someone plz tell me the function to get the current location of the program in MFC ?
|
|
|
|
|
|
Thanks alot
|
|
|
|
|
Hi All,
Help me out, it's very urgent.
How to Run UNIX based EXE [MKS] through Shell in VC++ application.
Intermediate Shell should not be seen (It can be hide); target application should rum through SHELL.
And Target Application status should be returned whether target application run or not.
Example:
Intermediate Shell Target Application
SHELL.exe -------------------------' Sample.exe
If any error occurs while running Target Application, return that status to application.
I am doing through _spawnl() API.
Int lnSts =_spawnl(_P_NOWAIT,"SHELL.exe","SHELL.exe","-Lc Target.EXE",NULL);
But in this case if my target application having any problem like Target EXE has Segmentation Error. _spawnl will not return Target Application Fail Error.
Is there any VC++ API, which executes any process through shell and returns its status?
Please help us. Any suggestion most welcome.
Pawan
|
|
|
|
|
Maybe I'm missing something but I'm reading this as "run a Unix executable binary on a Windows machine?" Can't be done by any means.
Judy
|
|
|
|
|
I suppose he's talking about Windows executables [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks all for your quick reply.
We have a MKS emulator installed on our Windows XP systems.
We have to develop an application in VC++ that will execute those MKS based exes using shell.
We use sh- Lc command to run these exes manually in shell.
we are currently doing this using _spawnl() API as below:
Int lnSts =_spawnl(_P_NOWAIT,"SHELL.exe","SHELL.exe","-Lc Target.EXE",NULL);
target.exe is the unix based exe.
we want to know the status of target.exe (whether properly executed or not)
_spawnl() is giving return status of target when _P_WAIT mode is on.
In that case, we need to wait till the target exe is completely executed.
And dont want to wait for that in out application. We just want to boot the target and know if that application successfully booted or not.
Is there any API/ method for doing this?
Any help is appreciated.
Thanks again!
|
|
|
|
|
I doubt it. How would you define "booted okay" which I take to mean it started okay and is now doing its thing. Applications either run or don't run (services don't count for this discussion, since you don't start a service this way) and you can't tell if they ran until they are done. There is the WaitForInputIdle function for GUI apps but I don't know enough about how your emulator works to know if it exposes that amount of info about the app it is running to the outside OS.
Judy
|
|
|
|
|
I think you're looking for wait() or waitpid(). Don't know if this exists in the windows world but in general, spawn() with a NOWAIT returns the pid of the spawned process. You use waitpid to wait for the exit status. Using a NOHANG flag with waitpid prevents blocking. Either poll with a waitpid or perhaps kick off another thread that does a wait.
No doubt there is a more windowzee way of doing this.
|
|
|
|
|
Manasi D wrote: How to Run UNIX based EXE [MKS] through Shell in VC++ application.
You mean - you want to run a native unix file under windows? And that's urgent?
That's impossible, my friend.
And who is voting me down on a programming forum for no good reason?!
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
modified on Friday, May 9, 2008 11:42 AM
|
|
|
|