how to store a user input value in exe - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to store a user input value in exe

suhredayansuhredayan Posts: 69Member
how to store a user input value in exe
can any one help

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    [b][red]This message was edited by AsmGuru62 at 2003-3-19 7:24:40[/red][/b][hr]
    : how to store a user input value in exe
    : can any one help
    :
    [blue]I am 99.95% sure that you can't store it in your own EXE - when the program is running Windows has exclusive I/O rights for that file. You probably can do it by going into RING0 and overriding the Windows privileges, but I am not sure about that.

    But you can do it, if the EXE which should be patched is not running. Add to it some resource string with unique key, like: "KEY=######" where ###### is your information to be saved. When building the EXE make sure linker does not have packing option.

    After that is easy: open the EXE as binary file. Find the KEY bytes and then save the needed number of bytes after that, so it will override the ######.

    If you trying to make some secure application and want to protect it - tell me what's the idea. Maybe, I can help...[/blue]


  • stoberstober Posts: 9,765Member ✭✭✭
    : how to store a user input value in exe
    : can any one help
    :
    [blue]maybe what you really want to know is how to store information in the registry so that a program can read it whan it starts up again?[/blue]
  • suhredayansuhredayan Posts: 69Member
    no i want to store information in the exe itself .
    is it possible without using another exe.
  • stoberstober Posts: 9,765Member ✭✭✭
    : no i want to store information in the exe itself .
    : is it possible without using another exe.
    :

    [blue]On Windows OS you can't do that because the exe will be in use. file open fails when attempting to open a program that is already running because the OS has it open in exclusive mode.[/blue]
Sign In or Register to comment.