Go Back   FileForums > Off Topic > Software
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18-11-2011, 14:31
ptsz ptsz is offline
Registered User
 
Join Date: Nov 2011
Location: Offland
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
ptsz is on a distinguished road
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.
Reply With Quote
Sponsored Links
  #2  
Old 18-11-2011, 16:27
TippeX's Avatar
TippeX TippeX is offline
zeroes and ones.....
 
Join Date: Jan 2003
Posts: 3,842
Thanks: 2
Thanked 33 Times in 23 Posts
TippeX is on a distinguished road
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...
Reply With Quote
  #3  
Old 18-11-2011, 17:12
ptsz ptsz is offline
Registered User
 
Join Date: Nov 2011
Location: Offland
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
ptsz is on a distinguished road
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
This is what you mean I guess? Close I hope at least.


I am new to it, but happy to learn how to do it.
Reply With Quote
  #4  
Old 18-11-2011, 18:10
TippeX's Avatar
TippeX TippeX is offline
zeroes and ones.....
 
Join Date: Jan 2003
Posts: 3,842
Thanks: 2
Thanked 33 Times in 23 Posts
TippeX is on a distinguished road
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...
Reply With Quote
  #5  
Old 18-11-2011, 18:53
ptsz ptsz is offline
Registered User
 
Join Date: Nov 2011
Location: Offland
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
ptsz is on a distinguished road
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.
Reply With Quote
  #6  
Old 19-11-2011, 03:37
TippeX's Avatar
TippeX TippeX is offline
zeroes and ones.....
 
Join Date: Jan 2003
Posts: 3,842
Thanks: 2
Thanked 33 Times in 23 Posts
TippeX is on a distinguished road
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...
Reply With Quote
  #7  
Old 19-11-2011, 06:54
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,836
Thanks: 20
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
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!
Reply With Quote
  #8  
Old 19-11-2011, 22:24
ptsz ptsz is offline
Registered User
 
Join Date: Nov 2011
Location: Offland
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
ptsz is on a distinguished road
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.
Reply With Quote
  #9  
Old 20-11-2011, 06:43
TippeX's Avatar
TippeX TippeX is offline
zeroes and ones.....
 
Join Date: Jan 2003
Posts: 3,842
Thanks: 2
Thanked 33 Times in 23 Posts
TippeX is on a distinguished road
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...
Reply With Quote
  #10  
Old 20-11-2011, 14:38
ptsz ptsz is offline
Registered User
 
Join Date: Nov 2011
Location: Offland
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
ptsz is on a distinguished road
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.
Reply With Quote
  #11  
Old 20-11-2011, 15:30
TippeX's Avatar
TippeX TippeX is offline
zeroes and ones.....
 
Join Date: Jan 2003
Posts: 3,842
Thanks: 2
Thanked 33 Times in 23 Posts
TippeX is on a distinguished road
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.
Reply With Quote
  #12  
Old 20-11-2011, 16:19
ptsz ptsz is offline
Registered User
 
Join Date: Nov 2011
Location: Offland
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
ptsz is on a distinguished road
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.
Reply With Quote
  #13  
Old 21-11-2011, 05:33
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,836
Thanks: 20
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
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!
Reply With Quote
  #14  
Old 21-11-2011, 07:06
TippeX's Avatar
TippeX TippeX is offline
zeroes and ones.....
 
Join Date: Jan 2003
Posts: 3,842
Thanks: 2
Thanked 33 Times in 23 Posts
TippeX is on a distinguished road
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...
Reply With Quote
  #15  
Old 21-11-2011, 08:53
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,836
Thanks: 20
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
Quote:
Originally Posted by TippeX View Post
i always wondered why a hybrid type didnt exist.
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!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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



All times are GMT -7. The time now is 15:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com