|
#1
|
|||
|
|||
|
Changing header of executable
Hi,
I was wondering if someone knew how I could modify the header of an executable to NOT open a console window? After the executable has been compiled. I know you usually do that during compiling but. It is my current understanding that you can modify the header of the exe file to not open a console window behind it. I hope that correct. Hopefully someone can help me? Thanks. |
| Sponsored Links |
|
#2
|
||||
|
||||
|
change the os subtype setting in the pe header from win cui to win gui... simple patch
__________________
bleh DO NOT PM me with questions, leave that in the forums...ESPECIALLY if i dont know you... |
|
#3
|
|||
|
|||
|
Thanks for the response.
Could you also tell me how to do that, which tools and stuff to use plus well some notes on how to do it. ![]() I have PE explorer, don't know if thats the one to use. Obviously I have a hex editor. Using PE explorer. When I open it up, the header. Code:
Subsystem 0003h Win32 Console ![]() I am new to it, but happy to learn how to do it. |
|
#4
|
||||
|
||||
|
yup thats it. .
if i remember right gui is 02 so change that, job done
__________________
bleh DO NOT PM me with questions, leave that in the forums...ESPECIALLY if i dont know you... |
|
#5
|
|||
|
|||
|
OK. And how do I change it? Because with PE explorer I can't as it seems. And with neo hex editor I didn't find the 003h (because I couldn't search for an "h").
Do you know another software I should be using? And can I do this with an app without a GUI as well? EDIT: I found it. Thank you very much for the help. So glad I could FINALLY get it to work.
Last edited by ptsz; 18-11-2011 at 19:37. |
|
#6
|
||||
|
||||
|
h = hex, can also be 0x
its convention... changing the subsystem isnt always a good idea, especially if it outputs to the console
__________________
bleh DO NOT PM me with questions, leave that in the forums...ESPECIALLY if i dont know you... |
|
#7
|
||||
|
||||
|
Yup, if the software expects to be running as console/GUI - and what software wouldn't?! - then changing its subsystem will make it go completely crazy. I just tried it with one of my own programs, originally console and hacked into GUI: after processing its input and sending the results into its output (redirected into a file so that I can see it really did something), it keeps running as if it is unable to realize that its input has ended.
(For hacking executables, Hacker's View is probably your best choice.)
__________________
Joe Forster/STA For more information, see the FileForums forum rules and the PC Games forum FAQ! Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply! Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back! |
|
#8
|
|||
|
|||
|
Yea I wouldn't expect user input to work anymore probably.
But for some that don't use or need it, it would be great. Plus executables compiled from other languages that may not have a console remover in the compiler as option. |
|
#9
|
||||
|
||||
|
not true..if its cui..its there for a reason..
example.. try looking at some dlls in system32
__________________
bleh DO NOT PM me with questions, leave that in the forums...ESPECIALLY if i dont know you... |
|
#10
|
|||
|
|||
|
OK, which one in particular?
I ran the app though process explorer but it uses a lot, so I didn't know which in particular you meant. PS: Also on another note, where should/can I ask about if anyone knows anything about LZSS compression? Which forum topic would that be? Last edited by ptsz; 20-11-2011 at 15:14. |
|
#11
|
||||
|
||||
|
quite a few of the system dlls are compiled as cui... have a look
![]() im guessing this question is driven from something like gta iv or maybe la noire that pops up a useless cui window? but just changing it can cause problems as some compilers / languages have subtle differences to the winmain / dllmain / main depending on how it was compiled whats the compression question?
__________________
bleh DO NOT PM me with questions, leave that in the forums...ESPECIALLY if i dont know you... Last edited by TippeX; 20-11-2011 at 15:33. |
|
#12
|
|||
|
|||
|
Oh no, it doesn't derive from game exe's. More from other languages which would not have the option to compile it without a console. Or just exe I would like to change or make, but lets say not having the option to remove the console.
You can also do it by running a winapi program calling the designated app by using "execlp("notepad.exe", 0);" but than you would of course need a second app to run the initial one without a console. ![]() But it would have the same effect. In general the apps would be C/C++ coded (except if in another language). I noticed some dlls compiled as cui yes. The compression question would be. I have a game which uses LZSS compression for most of its content and I would like to hack it. It has already been hacked so I have the AES encryption key and you can extract it. The problem is that every file above 200k is corrupt, completely. So you can't use them. That is the problem. I use QuickBMS to extract it. The problem is with the quickbms extracting script but I am not qualified enough to fix it properly. I was hoping someone else would. ![]() I asked the author if he would help but he didn't want to. I have the files, 1 win_000.nfs file 8mb and 1 win_000.full 4gb ready and uploaded (including both pack/unpack scripts). But I need someone who can help. Basically someone who knows something about LZSS compression to get it right. |
|
#13
|
||||
|
||||
|
You can run a console program without a console using start /b <program>. But that works from the command line interface - %COMSPEC% - only as it's an internal command. It won't work from a GUI program which is why I wrote two versions of the "Minimize2Tray" programs - console and GUI -, to be released some time...
__________________
Joe Forster/STA For more information, see the FileForums forum rules and the PC Games forum FAQ! Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply! Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back! |
|
#14
|
||||
|
||||
|
yeh, i always wondered why a hybrid type didnt exist.
ie: run from within console then console mode, otherwise gui...would be nice also only realised "hackers view" as hiew (what i usually call it) - excellent program..i even got work to license a copy...author is a nice guy too
__________________
bleh DO NOT PM me with questions, leave that in the forums...ESPECIALLY if i dont know you... |
|
#15
|
||||
|
||||
|
Hmmm, interesting, never thought of that. Actually, the program, compiled as GUI, can find out what type its parent process is and if it's a console then open a new console or attach itself to the parent's console; there are simple API calls for that. But I know already one problem: launching a GUI program from the console will return at once without waiting for the program to initiailize/send some signal/exit (start /wait <program> helps, though) and there can be more...
__________________
Joe Forster/STA For more information, see the FileForums forum rules and the PC Games forum FAQ! Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply! Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back! |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Intro Removing, ISO Header Editor, and More Selfboot-Related Questions | AMurderOfCrows | DC Games | 8 | 07-03-2010 09:14 |
| Flat Out Protection | t.foster73 | PC Games | 59 | 26-11-2004 01:39 |
| Syberia executable archive | indigo_soul | PC Games | 0 | 23-11-2002 17:04 |
| Fixed Executable vs. NO-CD Executable | jimshu1 | PC Games | 5 | 13-04-2002 13:51 |
| Need a way to unpack and repack a big executable! | Morglum007 | CD/DVD Copy Protections & Utilities | 3 | 19-10-2001 06:40 |