• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

modify exe

Status
Not open for further replies.
What do you mean modify .exe? You should be able to change it just normaly in your Warcaft III settings in "Video" when you start Warcraft.
Alternativly you could try to change it in your regedit -> HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\Video ; resheight reswidth (use decimal values) .. but the normal changed should work, too.
 
Afaik it depends on the program itself if such things are possible. Even if you make a short cut it's not said that you are allowed to put commands like "-width x, height y" or so.
You can look regedit, maybe you are lucky and find settings. Or google for your specific program how to change the resolution. I don't think there is a generic way.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
If the program has a hardcoded default, you can try to find it with a debugger and change it (e.g. OllyDbg v1.10)
Most programs have some sort of a configuration file(s) where this stuff is saved, and is usually human-readable, so changing it there will be of course much easier (and not considered illegal, which the first option is in most cases).
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
How do i achieved the effect?
By default this is not possible as there is no requirement for functionality to communicate the resolution for an executable to run at.

I am guessing the problem is that 640x480 is not supported by your display so once the executable starts you get "out of range" output? If that is the case then you can alter the scaling options in your GPU driver (EG NVidia Control Panel). If you set it to GPU scaling then it should output to the monitor at native resolution by up sampling the actual output. This will not increase sharpness of vector based graphics, but it will allow one to run resolutions not supported by your current display.

Most modern LCD displays using digital connections such as DVI/HDMI should have no problem accepting any input resolution lower than their native resolution.
 
Level 15
Joined
Aug 6, 2014
Messages
1,126
Afaik it depends on the program itself if such things are possible. Even if you make a short cut it's not said that you are allowed to put commands like "-width x, height y" or so.
You can look regedit, maybe you are lucky and find settings. Or google for your specific program how to change the resolution. I don't think there is a generic way.

There are a few programs that can do it like ResChanger, etc. but I need the EXE file to change resolution by itself.

By default this is not possible as there is no requirement for functionality to communicate the resolution for an executable to run at.

I am guessing the problem is that 640x480 is not supported by your display so once the executable starts you get "out of range" output? If that is the case then you can alter the scaling options in your GPU driver (EG NVidia Control Panel). If you set it to GPU scaling then it should output to the monitor at native resolution by up sampling the actual output. This will not increase sharpness of vector based graphics, but it will allow one to run resolutions not supported by your current display.

Most modern LCD displays using digital connections such as DVI/HDMI should have no problem accepting any input resolution lower than their native resolution.

No,no...my display is able to support that, DSG. I just need to find a way to make the EXE file change resolution when I start it.

Most of the time you need the source code. It's probably encrypted.

I will look for it...

If the program has a hardcoded default, you can try to find it with a debugger and change it (e.g. OllyDbg v1.10)
Most programs have some sort of a configuration file(s) where this stuff is saved, and is usually human-readable, so changing it there will be of course much easier (and not considered illegal, which the first option is in most cases).

I guess this is my only option despite the fact I have zero programming knowledge. It is okay if I share the EXE file with you guys to check?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
I just need to find a way to make the EXE file change resolution when I start it.
Command line if supported (which any reasonable application should support), otherwise it is impossible. Why do you need to start at a certain resolution?

I will look for it...
Source code is often kept private (not available to public).
 
Level 15
Joined
Aug 6, 2014
Messages
1,126
It would be much easier if I can just lock the Compatibility settings of the exe file. Any ways to do that?

Edit: I did it! Instead of search for the code and stuff, I created 2 batch files that function to change the resolution. (Change to 640x480 and the other one 1360x780). Then I compile the exe and the 2 batch files togther in iexpress.

However the issue is that, I am unable to search for any ways to revert back to its original resolution ( incase if the user is using some weird sizes) with the batch file. Got any ideas?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
It would be much easier if I can just lock the Compatibility settings of the exe file. Any ways to do that?
You can right click on the executable file and under properties/compatibility alter the Windows API compatibility level. If done by the administrator for all users the executable will use that Windows API compatibility level for all users when run (unless the user overwrites the setting himself).

However the issue is that, I am unable to search for any ways to revert back to its original resolution ( incase if the user is using some weird sizes) with the batch file. Got any ideas?
You have not even told us what executable you are trying to run and why you need such strange resolutions...

You should not be changing the desktop resolution. This can potentially render some systems unusable (until safemode is used to fix the change) if the currently connected display does not support the resolution.
 
Level 15
Joined
Aug 6, 2014
Messages
1,126
You can right click on the executable file and under properties/compatibility alter the Windows API compatibility level. If done by the administrator for all users the executable will use that Windows API compatibility level for all users when run (unless the user overwrites the setting himself).


You have not even told us what executable you are trying to run and why you need such strange resolutions...

You should not be changing the desktop resolution. This can potentially render some systems unusable (until safemode is used to fix the change) if the currently connected display does not support the resolution.

The exe file is actually a game. and I want to launch it in full screen(at least). 640x480 is the best so far for the aspect ratio of my game's screen.

I've seen some games doing something similar like Counter strike 1.6 and etc. It should be safe. (even Windows allow it).
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
You are creating a game with no programming knowledge, ok.
What you'd generally do is get the maximum rectangle that fits your aspect ratio in relation to the resolution, in your case, the biggest 4:3 rectangle, and then you wrap it if needed on the sides or on the top and bottom.
So, if the game runs on 1920x1080, for example, then you have a rectangle that is 1440x1080, with black bars on the left and right that are 240 pixels wide each.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
Yes yes, I am creating the Game. I know i am not professional but what can i do? I have zero knowledge on programming stuff.
All modern games should be made targeting 16:9 as most computer/tv displays sold today are 16:9 aspect ratio. Of course do not take my word for it, take statistics from here and here which state that over 60% of systems running Unity based games (a highly used commercial grade game engine) use 16:9. The reality is that 4:3 support should be optional.

How do you currently manage your game graphics? Perhaps a few minor code alterations would be all that is needed to perform something like GhostWolf has suggested and dynamically putting black bars to force 4:3 aspect ratio.

Too bad, I still can't find a solution for making a batch file which helps to return to the pc's maximum original resoltuion...
Which is why you need to program resolution changes into the game, and not use a batch script. This way when the application is minimized/closed it will automatically restore the desktop resolution.
 
Status
Not open for further replies.
Top