Results 1 to 9 of 9

Thread: Creating a .exe with changed variables

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    26

    Wink Creating a .exe with changed variables

    hello

    I want to create a program that could develop an another program with a specified variable

    eg:

    I got 2 programs: Tool Builder and myTool


    For myTool, is designed a variable called URLpath, that is used for open a url in IE.

    So, i open tool builder, write this variable in a text field( for exemple, www.google.com), and then click on COMPILE, so, i'll create the myTool)

    When i run mytool, www.google.com will open

    ...

    How can i make this?


  2. #2
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Creating a .exe with changed variables

    If you want to open a specific url then a windows shortcut will do.

    If you include a constant in a program then that constant's data will be included in the exe.
    You can change it with a hexeditor. String constants should be easy to spot.

    If you make an exe that opens some url then your builder program can change a string inside that exe.
    Which, BTW, is not compiling.

    A better option would be to make mytool.exe accept commandline parameters and create a shortcut with the right parameters.
    Or make it read a file with settings.

    Why do you want to do this?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    26

    Re: Creating a .exe with changed variables

    i dont want to make a url program, it was just an exemple
    :P


    I didnt understand how can i make this :/ ( i cant use .ini or commandlines)

    Can i change the string Directly by the tool builder?

    firstly, how can i create a exe with my App running?

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Creating a .exe with changed variables

    Quote Originally Posted by jonit
    i dont want to make a url program, it was just an exemple
    :P


    I didnt understand how can i make this :/ ( i cant use .ini or commandlines)

    Can i change the string Directly by the tool builder?

    firstly, how can i create a exe with my App running?
    You can't.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    26

    Re: Creating a .exe with changed variables

    Why not? :X

  6. #6
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Creating a .exe with changed variables

    Exactly with you app probobally not, but you can always call the compiler.

  7. #7

  8. #8
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Creating a .exe with changed variables

    Commandline parameters given to the program when it was started can called with Command.
    It is a string containing the parameters that you can process.

    Ini files are just textfiles where you store data.

    VB Code:
    1. i dont want to make a url program, it was just an exemple
    2. :P
    Then what exactly do you want?

  9. #9
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Creating a .exe with changed variables

    It is possible.

    Except it's not really making an EXE from scratch, (you would need a compiler). You make 2 EXEs, one that "modifies" the other one, and one that reads from itself.

    I wrote an example on here along time ago, it might be what you're looking for.

    See this thread:

    http://www.vbforums.com/showthread.php?t=332646

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width