Brand an EXE file with certain info

Do anyone perhaps have code on How to write certain info like a name directly to the same EXE file. I do not want to write to an INI file or the registry.
benekeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
Under the Make EXE selections, there are information Options, such as Comments, Company Name, etc.

These also correspond to App.Comments and App.CompanyName.
0
benekeAuthor Commented:
EX: I would like the user to ask his name, company and serial and then would like to BRAND the exe with the entered information. The form would only appear if the user run it the first time or as long he did not answer all the questions satisfactory.
0
mark2150Commented:
You can't modify a running .EXE from within itself. The .EXE file is locked by windows. Therefore you need a 2nd program to do the branding.

This is propably not worth the effort to code because the changed bytes can be revealed by a simple file comparision of the before and after versions of the EXE.

Since 99.99% of the file will be unchanged the ID that you wrote will stick out like a sore thumb. Since it will be trivial to find you might as well do it the normal way and stick it in the registry or an .INI file.

M
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

przemekCommented:
Try my idea.
1) Define Const in your vb project
Const MyConst = "1234567890123456789012345678901234567890"
( this text will be written to exe in unicode format).
2) mark2150 has right. You have to run other program to find your signature in exe ( your signature is : 1234567890123456789012345678901234567890
) and write your data .
3) in vb you can simply use MyConst
MyConst="User;Company;..."
MsgBox MyConst
4) remember you are working with unicode strings !!!

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mark2150Commented:
Yeah, but the signature change will show up as the only bytes changed in the file. A couple minutes fiddling with a binary editor and I can set that to any thing I want. Not much security there.

M
0
przemekCommented:
mark2150 Question was:
How to write certain info like a name directly to the same EXE file ?
Of course yoy can write simple function to code and decode text.
I know your next comment:
"I can easy decode it."

but 99,99% users not.

0
mark2150Commented:
Doesn't matter that it's easy or hard to decode. What matters is that the location shows up like a beacon in the night.

If I get a listing of what it *used to* be then I can reset it to the "uninstalled" state any time I want. Decoding it isn't required. Once the file is back to the original state I simply reinstall and put in what I want for company name and such.

The encoding doesn't do *squat* to protect the .EXE. Wouldn't take me but a few minutes to write a patcher that restored the file to it's clean, installable state no matter how well the text was encoded.

M

0
benekeAuthor Commented:
Thanks. I don't want to write any data that would be of that high importance into the EXE to be encrypted. It seem though that it is not worth doing it and that it would be much less hazzle to write the data to an INI file.
0
mark2150Commented:
So howcum you gave the points to przemek ? :-)

M

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.