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:
 

Herman

Well-known member
Joined
Oct 18, 2011
Messages
882
Location
Montreal, QC, CA
Programming Experience
10+
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...
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,397
Location
Sydney, Australia
Programming Experience
10+
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.
 

Conejo

Well-known member
Joined
Jul 24, 2013
Messages
65
Location
USA
Programming Experience
1-3
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.
 

Conejo

Well-known member
Joined
Jul 24, 2013
Messages
65
Location
USA
Programming Experience
1-3
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")
 
Top Bottom