Script to exe?

Conejo

Well-known member
Joined
Jul 24, 2013
Messages
65
Location
USA
Programming Experience
1-3
Hey guys can anyone get me started on how to convert a script to an executable? also how do you generate exes in vb?:welcoming:
 
If by script you need something that runs on the Windows Scripting Host, then all you need is to make a VB app with a script control. But then I would ask, if you are gonna use VB anyways, why would you not rewrite your script properly?

I'm not sure what you are saying in the second question. Have you never ever used VB at all? Pretty sure I saw you post before...
 
If you want to generate and compile source code at run time then you use the CodeDOM. Check it out on MSDN. You're going to have to provide the logic to convert commands in one language to VB source code though.
 
i used code dom but my script wont run it says its not a valid win32 app :ambivalence: ill try to see if i can do something about it but if i cant i will post what i have till now so you can help me
thanks.
 
ok i know i need to make some changes but this is what i have so far im thinking ill store the contents of batch file in resources:


Dim p As New CodeDom.Compiler.CompilerParameters()
p.GenerateExecutable = True p.OutputAssembly = "converted.exe"
p.ReferencedAssemblies.Add("System.dll")
p.EmbeddedResources.Add("res.resources")
 
Back
Top