Click here to Skip to main content
16,018,797 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create an application, which can create an exe file with given set of instruction. Is that possible?

What I have tried:

I have no idea and seeking some advice.
Posted
Updated 17-Jul-18 22:29pm
Comments
Kornfeld Eliyahu Peter 18-Jul-18 4:17am    
Yes... All you need is some code to generate and compile the new code...

It is possible. Such applications are called compilers (Compiler - Wikipedia[^]).

But writing one is an advanced task (very high level of difficulty).
 
Share this answer
 
The .NET framework - which your VB app will need in order to run - includes the CSC.EXE file which is the C# compiler, so every computer capable of running your app can produce EXE files - but only if your app emits valid C# code, and runs it through the C# compiler. The VB compiler is not included with .NET installations, so technically you would need to install VS on each computer to use VB as your "target language". That could well give you problems, partly because of the size, but mostly the breach of copyright and licencing conditions...

There are two alternatives: produce a native code or IL EXE file yourself - this is a lot of work - or write an app that processes scripts and generate those scripts for it instead. Depending on what you are trying to do - i.e. how complex a job you want the app you create is - this could be a lot, lot quicker and more reliable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900