
Run a vbs file from Visual Basic
Or take a look at the Microsoft Script Control. It allows you to host
VBScript (or JScript) in your VB application. This would allow you to run
the VBS in process without having to worry about hiding windows etc. You
can get the control free from
http://msdn.microsoft.com/scripting/scriptcontrol
--
Regards
Andrew Clinick
Microsoft Scripting Program Manager
http://msdn.microsoft.com/scripting
Quote:
>Or use the ShellExecute API which will execute the script using the
>associated default handler for the script type.
>--
>---------------------
>Joe Guidera
>Microsoft MVP DTS
>ClubWin Chapter 10
>WUGNET
>My email address is intentionally invalid. Remove the ".---"
>to get to my real address.
>>Try this:
>>Keep you RunFile line unchanged but in name of file, you must have:
>>CSCRIPT or WSCRIPT and the name of your wsh script ( with the .VBS or .JS
>>extension)
>>>How can I execute a vbs file from Visual Basic. My code reads as
follows:
>>> RunFile = Shell(NameofFile, vbHide)
>>>I receive an error message.
>>>Please Help!
>>>Thanks