473,394 Members | 1,715 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,394 software developers and data experts.

Runing vbs form C#

MAF
I am attemtping to run a vbs from C# code and I want to force the
application to use cscript.

If I attempt to use filename , cscript.exe and arguments equal to the vbs
file the script does not run, but if I use the filename as the script file
everything works. The problem is that I want to force windows to use the
cscript engine and not what the default is. Any ideas?
scriptConsoleProcess = new Process();

//Does not work

//scriptConsoleProcess.StartInfo.FileName = "CScript.exe";

//scriptConsoleProcess.StartInfo.Arguments = scriptPath;

//Works

scriptConsoleProcess.StartInfo.FileName = scriptPath;

//scriptConsoleProcess.StartInfo.UseShellExecute = true;

scriptConsoleProcess.StartInfo.CreateNoWindow = true;

scriptConsoleProcess.Start();

//scriptConsoleProcess.WaitForExit(60000);

if (scriptConsoleProcess != null)
Feb 27 '06 #1
0 1032

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

Similar topics

3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
3
by: dahuzizyd | last post by:
Hi all I want to judge an application is runing or not when another application start . If the application is running , get focus. I use the Pinvoke to invoke the FindWindow function ,I...
1
by: Joey | last post by:
I am using the below code to run a dos based program. While it is running you can hit ctrl-c to cancel the process. Does anyone know how I can send the same keystroke to the already runing...
5
by: mastar | last post by:
Hi all im trying to run a file localy on my server (2003) using asp , this is the code : <%@ LANGUAGE = "JAVASCRIPT" %> <% var commandLine = "File_NAME.EXE"; var WshShell =...
2
by: atiq | last post by:
why isn't my Access giving me warning before runing the delete, append or update query because usually it warns you that you are about to append, update or delete the following number of records. It...
0
by: smugcool | last post by:
hi, I have made a project on vb 6.0. And i have made a setup file for the same. When i am runing this file in WINDOWS XP, its running absolutly fine. But the same setup file when i try to run...
0
by: PanchalRakesh | last post by:
Dear All, I am Developing a window service in which i am continously check which program runing currently in my computer memory for how many time , in which memory address and when it start and...
7
by: colin | last post by:
Hi, Ive written a 3dmodel editor, and it works fairly well it harldy uses any cpu exept when its loading a texture from bitmap in the debugger, at all other times it hardly uses any cpu but from...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.