473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

running vbscript from VB.NET

Hi,

I want to run some vbscripts from a VB.NET application. Anybody knows how to
do this?

Thanks,

Pieter
Nov 20 '05 #1
7 18936
Cor
Hi Pieter,

In a webform or in a windowform?

Cor
Nov 20 '05 #2
Hi Cor,

It's in a windowform :-)

"Cor" <no*@non.com> wrote in message
news:Oi**************@TK2MSFTNGP12.phx.gbl...
Hi Pieter,

In a webform or in a windowform?

Cor

Nov 20 '05 #3
Cor
Hi Pieter,

This is the only one I could find direct,

It uses the webbrowser

It was the first piece of code I got from Herfried and I find it still
greath.

(Do not think there was much after that)

:-))

\\\
AxWebBrowser.Navigate("about:<html><body
onload=javascript:window.external.addFavorite('" + textbox1.Text +
"')></body></html>")
///
Cor
Nov 20 '05 #4
* "DraguVaso" <pi**********@hotmail.com> scripsit:
I want to run some vbscripts from a VB.NET application. Anybody knows how to
do this?


\\\
System.Diagnostics.Process.Start("C:\foo.vbs")
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Thanks, that's what I need! :-)

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
* "DraguVaso" <pi**********@hotmail.com> scripsit:
I want to run some vbscripts from a VB.NET application. Anybody knows how to do this?


\\\
System.Diagnostics.Process.Start("C:\foo.vbs")
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #6
You need to host the VBScript within something; the simplest thing to do is
to put a reference the Microsoft Script Control into your windowform, then
run the script within the control.
DraguVaso wrote:
Hi Cor,

It's in a windowform :-)

"Cor" <no*@non.com> wrote in message
news:Oi**************@TK2MSFTNGP12.phx.gbl...
Hi Pieter,

In a webform or in a windowform?

Cor

Nov 20 '05 #7
You have 2 options:

1. Run vbscript as standalone process - VB.Net has Shell() function. Execute

cscript.exe "C:\Path\FileName.vbs"

2. Host vbscript inside your application - the easest way is to use
Microsoft Script Control.

As another option you may let users write VB.Net code. In your application
you will need to compile and run it.

//------------------------------------
Regards,
Vassiliev V. V.
http://www-sharp.com -
Scripting/HTA/.Net Framework IDE

"DraguVaso" <pi**********@hotmail.com> сообщил/сообщила в новостях
следующее: news:%2******************@tk2msftngp13.phx.gbl...
Hi,

I want to run some vbscripts from a VB.NET application. Anybody knows how to do this?

Thanks,

Pieter

Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Si | last post by:
Hi Guys I am using this code to execute an Access VBA function from ASP: strDbName = strDataSource & "data\webjobs.mdb" Set objAccess = Server.CreateObject("Access.Application")...
8
by: Dave Thomas | last post by:
I have developed a web site using asp pages that use both vbscript and javascript. Run the site on my PC and everything is fine. Ftp to my web hosting provider which hosts asp pages and look on my...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS╜ package from an ASP (VB)script and would appreciate any and all response. ╜I don't even know if it's possible Thanks - Chuck...
2
by: Gemma M | last post by:
Hi, I have a C# program which obtains a string from a database containing VBScript, or JavaScript, or Perl script, and I want C# to be able to run it. In VB6 (COM), I used...
3
by: AdamM | last post by:
Hi all, When I run my VbScript, I get the error: "ActiveX component can't create object: 'getobject'. Error 800A01AD". Any ideas what I did wrong? Here's my VBScript: dim o set...
4
by: sparky | last post by:
I've been working on an ASP driven website, on a client's web hosting space. One of the project requirements was the ability for the client to be able to upload files through an HTTP form. No...
16
by: Jordan S. | last post by:
I have a VBScript that runs on the server. I want to call that script from an ASP.NET Web application. How can I do that? Thanks!
7
by: dkiernan | last post by:
I am stumped. I have several websites running on a 2003 IIS6 box, all running basically the same code (each site has its own home directory and copy of the code). All are running in the same App...
6
by: ShieldsJared | last post by:
Hello all, I've been working on an application for a while now and have now come to a standstill. I have an application that I intend to have stored on a file server (developed in C#), which...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.