|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
convert vb script to exeHi
is there a good recommended tool to convert vb scripts to exe files? -- Dee Hi Dee,
> is there a good recommended tool to convert vb scripts to exe files? you may possibly use vb6 to make an exe form a vbscript.You have to use a link (in german it's called "Verweis") in the project to the windows scripting host. I think the guys in vb6 can answer the question more detailed. Dirk Dee wrote:
> Hi Since classic VB and VBScript are so similar, VB is a good choice. I don't > > is there a good recommended tool to convert vb scripts to exe files? > -- know of any programs to automatically convert, but many VBScript programs can be manually converted into classic VB (not .NET). You need VB (or classic Visual Studio) installed. The main difference is that VB does not have a Wscript object, so you cannot use Wscript.Sleep, Wscript.Echo, and Wscript.Quit. Use Call MsgBox in place of Wscript.Echo. Use End in place of Wscript.Quit. You can use a Timer control in place of Wscript.Sleep. If you use Scripting.Dictionary or Scripting.FileSystemObject then you should add a reference to "Microsoft Scripting Runtime", which is scrrun.dll, to the project. If you want a form with an OK button to launch your code, open the VB IDE, create a standard exe, add two CommandButtons to the form and rename them "OK" and "Exit", then go to the code view and enter the following: =========== Private Sub End_Click End End Sub Private Sub OK_Click ' Paste your VBScript program here. End Sub ========= Then make the project and you have an exe that runs your VBScript program when you click "OK". You click "Exit" to quit the program. If you don't want a form, add a Module to your project and remove the form. Then paste your VBScript code into a Sub Main in the module and build the exe. The exe runs your program without a GUI, unless you have Call MsgBox or InputBox or other VBScript GUI functions in the code. Thanks, will lookinto VB
-- Show quoteHide quoteDee "Richard Mueller [MVP]" wrote: > Dee wrote: > > > Hi > > > > is there a good recommended tool to convert vb scripts to exe files? > > -- > > Since classic VB and VBScript are so similar, VB is a good choice. I don't > know of any programs to automatically convert, but many VBScript programs > can be manually converted into classic VB (not .NET). You need VB (or > classic Visual Studio) installed. > > The main difference is that VB does not have a Wscript object, so you cannot > use Wscript.Sleep, Wscript.Echo, and Wscript.Quit. Use Call MsgBox in place > of Wscript.Echo. Use End in place of Wscript.Quit. You can use a Timer > control in place of Wscript.Sleep. > > If you use Scripting.Dictionary or Scripting.FileSystemObject then you > should add a reference to "Microsoft Scripting Runtime", which is > scrrun.dll, to the project. > > If you want a form with an OK button to launch your code, open the VB IDE, > create a standard exe, add two CommandButtons to the form and rename them > "OK" and "Exit", then go to the code view and enter the following: > =========== > Private Sub End_Click > End > End Sub > > Private Sub OK_Click > ' Paste your VBScript program here. > End Sub > ========= > > Then make the project and you have an exe that runs your VBScript program > when you click "OK". You click "Exit" to quit the program. If you don't want > a form, add a Module to your project and remove the form. Then paste your > VBScript code into a Sub Main in the module and build the exe. The exe runs > your program without a GUI, unless you have Call MsgBox or InputBox or other > VBScript GUI functions in the code. > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > > I realize this is an old thread, but I have another suggestion. I
purchased a program called ScriptCryptor. http://www.abyssmedia.com/scriptcryptor/ I think it works great. It allows you to compile your VBScript code into an EXE. Allows you to set a custom icon for it too. It was inexpensive as well. Another option is instantExe. http://www.instantexe.com/ Hope that helps, Regards, Mark D. MacLachlan
Batch Script Text file parse
Drive Mapping in Server 2008 Query OU for disabled computers Script AD remove all members groups OU Issues when launching a vbscript file from hta interface file Re: Updating AD with a script Command to add registry entry Total size of sql databases Scripting, Local Admin Account How to query archived event log |
|||||||||||||||||||||||