Creating a .exe with changed variables
hello :D
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?
:afrog:
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?
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?
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.
Re: Creating a .exe with changed variables
Re: Creating a .exe with changed variables
Exactly with you app probobally not, but you can always call the compiler.
Re: Creating a .exe with changed variables
It's just one of those things that's not possible.
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:
i dont want to make a url program, it was just an exemple
:P
Then what exactly do you want?
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