473,406 Members | 2,281 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,406 software developers and data experts.

How to excecute a VBS from VisualBasic

Hello,
I cannot find a way to start a windows script (test.vbs) from a Visual basic
program.
i tried Shell with no success:
prog = "Test.vbs"
retval= Shell (prog, 1)
I get always an error 5 at execution time.
Thanks for your help
Yves

Jul 17 '05 #1
2 2851
It should work using "WScript.exe test.vbs"

_____________________________

ma**********@mindYYspring.com
For return email remove XX and YY.
_____________________________
Yves <yv*********@invalid.org> wrote in message
news:cp**********@news.tiscali.fr...
Hello,
I cannot find a way to start a windows script (test.vbs) from a Visual basic program.
i tried Shell with no success:
prog = "Test.vbs"
retval= Shell (prog, 1)
I get always an error 5 at execution time.
Thanks for your help
Yves

Jul 17 '05 #2
Many thanks, it works.
Thanks for your help.
Yves
"mayayana" <ma**********@mindYYspring.com> a écrit dans le message de news:
5U************@newsread3.news.atl.earthlink.net...
It should work using "WScript.exe test.vbs"

_____________________________

ma**********@mindYYspring.com
For return email remove XX and YY.
_____________________________
Yves <yv*********@invalid.org> wrote in message
news:cp**********@news.tiscali.fr...
Hello,
I cannot find a way to start a windows script (test.vbs) from a Visual

basic
program.
i tried Shell with no success:
prog = "Test.vbs"
retval= Shell (prog, 1)
I get always an error 5 at execution time.
Thanks for your help
Yves


Jul 17 '05 #3

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

Similar topics

2
by: RitaG | last post by:
Hi. I have a utility program that has a form that allows a user to select a file. I'm then using the LEFT Function to get some information. sNewFilePathName = Left(sFilePathName, iCnt) I'm...
2
by: darrel | last post by:
I've built a control. At the top of my control, I have this: Imports Microsoft.VisualBasic Then, later, I call a function like this: DateTime.Now.Year.ToString() This works fine on my...
15
by: Phill. W | last post by:
Is anyone writing VB.Net (2003) code /without/ referencing the Microsoft.VisualBasic namespace(?), regardless of whether its Import'ed or not? The Powers That Be here are trying to introduce a...
14
by: frostalicious | last post by:
Used VB.NET (on my client PC) to convert VB6 executable to .NET executable. Placed the .exe file on a network drive on my server. From client, ran .NET Wizards "Trust an Assembly" to make the...
2
by: Steve | last post by:
Having only recently migrated across from VB6 to VB.NET I'm still unsure whether or not I should be making (heavy) use of the Microsoft.VisualBasic namespace in new applications. I've read a lot...
8
by: Dave | last post by:
I'm trying to import Microsoft.VisualBasic to use the IsNumeric function in my C# code but all I see is: Microsoft.VisualBasic.VBCodeProvider while using Intellisense... From samples shouldn't...
1
by: Tom Kearney | last post by:
Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListener" from a set of C# aspx web pages, but I can't seem to use: <%@ Import Namespace="Microsoft.VisualBasic.Logging" %> I...
4
by: Rainer Queck | last post by:
Hello NG, are there any limitations to be considered, if I make use of objects in the Microsoft.VisualBasic namespace? Regards Rainer Queck
16
by: cj | last post by:
I am under the impression they are obsolete methods included for backward compatibility. For instance is using filedatetime("c:\myfile.txt") still the accepted way of getting the date...
6
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have two questions with regards to the LEFT function. I ran into a problem with the LEFT function today. I knew it was a valid Function, but when I tried to use it, it was getting interpreted...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.