471,330 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Run vbs from C#

MAF
I need to find a way to run a vbs on the same thread that I am currently on.

Here is the code I have now and this causes the scripts to be run out of
order. I want to have the application wait until the process is finished
before executing the next script.
Process scriptConsoleProcess;
scriptConsoleProcess = new Process();

scriptConsoleProcess.StartInfo.FileName = scriptPath;

scriptConsoleProcess.StartInfo.UseShellExecute = true;

scriptConsoleProcess.StartInfo.CreateNoWindow = true;

scriptConsoleProcess.Start();
Feb 23 '06 #1
1 7848
After you start the process:

while (scriptConsoleProcess.HasExited == false) {
// do nothing ... or maybe exit if too much
// time has passed.
}
MAF wrote:
I need to find a way to run a vbs on the same thread that I am currently on.

Here is the code I have now and this causes the scripts to be run out of
order. I want to have the application wait until the process is finished
before executing the next script.
Process scriptConsoleProcess;
scriptConsoleProcess = new Process();

scriptConsoleProcess.StartInfo.FileName = scriptPath;

scriptConsoleProcess.StartInfo.UseShellExecute = true;

scriptConsoleProcess.StartInfo.CreateNoWindow = true;

scriptConsoleProcess.Start();

Feb 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by
reply views Thread by rosydwin | last post: by

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.