Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > convert vb script to exe

Reply
Thread Tools Display Modes

convert vb script to exe

 
 
Dee
Guest
Posts: n/a

 
      04-17-2009
Hi

is there a good recommended tool to convert vb scripts to exe files?
--
Dee
 
Reply With Quote
 
 
 
 
Dirk Stegemann
Guest
Posts: n/a

 
      04-18-2009
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
 
Reply With Quote
 
Richard Mueller [MVP]
Guest
Posts: n/a

 
      04-18-2009
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
--


 
Reply With Quote
 
Dee
Guest
Posts: n/a

 
      04-20-2009
Thanks, will lookinto VB
--
Dee


"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
> --
>
>
>

 
Reply With Quote
 
Mark D. MacLachlan
Guest
Posts: n/a

 
      07-02-2009

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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert file .bat a script aaiitt99 Scripting 1 04-08-2008 08:03 AM
Need help with a script to convert the domain Robert Scripting 0 04-02-2008 03:44 AM
Script to auto-convert mp4 files Jakob Rödström Scripting 0 05-25-2007 11:05 AM
convert wmi script to .net sergeyko Scripting 1 12-03-2004 01:21 AM
Convert Perl to VBS script...need help I C Scripting 0 12-26-2003 05:54 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59