Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
RayeR(R)

Homepage

CZ,
19.01.2015, 18:17
 

Looking for utility to patch MSVC11+ EXE to run under XP (Developers)

Hi,
maybe you are aware with this issue, I met this today when running some MSVC13 binary (ELA ETER for RFID). I found the solution
https://tedwvc.wordpress.com/tag/windows-xp-sp3/
using EDITBIN.EXE that is a part of older MSVC. It also depends on LINK.EXE and MSPDB80.DLL. I rememember that I visited some personal's website where was offered a freeware patching utility to do the same without need a MSVC depencies but I cannot remember where and Google doesn't helping me much. Does somebody knows about it?

---
DOS gives me freedom to unlimited HW access.

roytam(R)

20.01.2015, 03:45

@ RayeR
 

Looking for utility to patch MSVC11+ EXE to run under XP

> Hi,
> maybe you are aware with this issue, I met this today when running some
> MSVC13 binary (ELA ETER for RFID). I found the solution
> https://tedwvc.wordpress.com/tag/windows-xp-sp3/
> using EDITBIN.EXE that is a part of older MSVC. It also depends on LINK.EXE
> and MSPDB80.DLL. I rememember that I visited some personal's website where
> was offered a freeware patching utility to do the same without need a MSVC
> depencies but I cannot remember where and Google doesn't helping me much.
> Does somebody knows about it?

I wrote a small EDITBIN replacement myself with TCC (so it links to MSVCRT.DLL only).
http://roy.orz.hm/gpc/files1.rt/pehdr.zip

Usage: pehdr-lite <PE-file> [+|-dll] [+|-win] [+|-con] [-osver <number.number>] [-subsysver <number.number>]

+dll sets IMAGE_FILE_DLL and -dll unset it.
+win/-con changes Subsystem flag to IMAGE_SUBSYSTEM_WINDOWS_GUI
-win/+con changes Subsystem flag to IMAGE_SUBSYSTEM_WINDOWS_CUI

I don't need to explain -osver and -subsysver, right? ;-)

bearwindows(R)

Homepage

missing nowhere,
20.01.2015, 09:24

@ roytam
 

Looking for utility to patch MSVC11+ EXE to run under XP

Hi there!
I use HIEW editor for this purpose.
( http://dml.compkaluga.ru/forum/index.php?s=89cdcd8...e2d8da&act=attach&type=post&id=1456 )
Press F8, then F3 and change OS, Image and Subsystem versions.
You could also recalculate checksum, since header content changed.
It is strictly needed for drivers (*.SYS files) - with bad checksum driver will be refused to run.
Press F3 under Checksum field and it will be recalculated.
Press F9 to save.

RayeR(R)

Homepage

CZ,
20.01.2015, 17:18

@ bearwindows
 

Looking for utility to patch MSVC11+ EXE to run under XP

> Hi there!
> I use HIEW editor for this purpose.
> (
> http://dml.compkaluga.ru/forum/index.php?s=89cdcd8...e2d8da&act=attach&type=post&id=1456
> )
> Press F8, then F3 and change OS, Image and Subsystem versions.
> You could also recalculate checksum, since header content changed.
> It is strictly needed for drivers (*.SYS files) - with bad checksum driver
> will be refused to run.
> Press F3 under Checksum field and it will be recalculated.
> Press F9 to save.

Yes, HIEW is a multipurpose cannon, I rather looking for comething small commandline tool that I can call from a batch, roytam tool should be ok.

---
DOS gives me freedom to unlimited HW access.

RayeR(R)

Homepage

CZ,
20.01.2015, 17:19

@ roytam
 

Looking for utility to patch MSVC11+ EXE to run under XP

OK, thanks. Does your tool recalc the checksum? Editbin does.
EDIT: Yes as I can see in source there's code for this
/* recalculate PE checksum */

---
DOS gives me freedom to unlimited HW access.

Back to index page
Thread view  Board view
15108 Postings in 1358 Threads, 246 registered users, 14 users online (0 registered, 14 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum