Solved

How to execute *.mst (scripts) in visual basic ?

Posted on 2004-04-13
4
188 Views
Last Modified: 2013-11-25
Hey,
        Can someone tell me how to run *.mst (script files) through code. The mst file was written in Rational Visual Test and I need to know how to execute that file through code in VB. Please answer as soon as possible. Thanks in advance.
0
Comment
Question by:gohulanb
4 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 10819925
Try use ShellExecute API?

Example:

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Function StartDoc(ByVal FileName As String, Optional CommandLine As String = "") As Long
    StartDoc = ShellExecute(0&, "Open", FileName, CommandLine, vbNullString, 1)
End Function

then use like:

StartDoc "c:\test.mst"

Let me know if it's not working, regards
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 11441095
PAQed - no points refunded (of 125)

Netminder
Site Admin
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WPF issue with Trigger 2 105
Added a column screws up code 5 57
Publisher:   Unknown     VB.exe Application 1 17
VBA - If Bookmark = "XXBOOKMARKXX" then 15 24
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now