News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Installers and Uninstallers

Started by ossama, December 29, 2007, 04:27:26 PM

Previous topic - Next topic

ossama

okay, let me reformulate the above question :
is there a way for a program to know its size using only PE format?

Jackal

umm you can calculate the size of the entire executable.

Tedd

Add an extra variable in your .data section and use it as though it contains the size of the exe (it won't, first it will be zero..)
Then assemble and link your exe, as normal.
Now modify/hex-edit the exe and overwrite the variable with the actual exe size.
And now you can append any data files and know where to find them.

If you don't want to do this by hand, it's simple enough to create another program the does it all automatically :wink
No snowflake in an avalanche feels responsible.

Jackal

thats a good idea.. the way i was thinking is i think you can jump through the exe and add up all the section sizes. This is more of a pain to do however.

ossama

Quote from: Jackal on January 21, 2008, 03:14:01 PM
thats a good idea.. the way i was thinking is i think you can jump through the exe and add up all the section sizes. This is more of a pain to do however.
this is what i was asking for (add size of sections in pe format),but later i found the method of tedd.but i dont have to use the hex editor to set the size,i do as folow:
1- use a variable to hold the size of the executable (in this stage it holds any value)
2- after build the executable i see the size in bytes (i dont execute the program,just build it)
3-i return to the source code and set the value of the size.
4- build the program and concatenate the files to the end of my executable (or concatenate files with a header that contains informations like path,shortcuts,....) then the setup is done  :U

ossama

how can i put my installed application in the "add/remove programs" list in windows xp?

xmetal

Try this:

Create key:      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<Your App Name>
Create string:   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<Your App Name>\DisplayName=<Your App Name>
Create string:   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<Your App Name>\UninstallString="Path\<Your Uninstaller>.exe"

ToutEnMasm


Better solution is to used the windows installer ( free for download ) or to used a .inf file

ossama

Quote from: ToutEnMasm on January 23, 2008, 05:36:36 PM

Better solution is to used the windows installer ( free for download ) or to used a .inf file
how can i use .inf files? what are the limitations using .inf files?
thank you in advance

ToutEnMasm


There is no limitations using .inf.A .inf is a textfile that give the command to the system when installing it and desintalling it.
It's free of use,it is with your system and there is a help file that exist to use them.
Search .inf with the internet explorer and you will find it.

ossama

is using .inf files a recomended way in winows xp,or it is best for win9x?

ossama

this is from MSDN:
Quote
INF files provide the ability to create customized software installation instructions, which include registry entries and destination directories. By pointing to the URLs of files to download, an INF file provides instructions that Internet Explorer uses to install your software components.

The INF file specifies the files that need to be downloaded and set up for the component to run. INF files can provide limited platform independence and specify limited software dependencies.

INF files are compatible with Internet Explorer 3.0 and later. Support for OSD files began with Internet Explorer 4.0.

i understand that .inf files origins are for downloading and installing internet components ?