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

%1 is not a valid Win32 application in Process.Start()

kk
hello all,

I want to call an exe(IISWeb.vbs) to create a site in Sharepoint.While
calling that exe through Process.Start() it throws the following
exception.

1.while calling through webService ,it throws the exception "ACCESS
DENIED".

2.While calling through console Application,it throws

"%1 is not a valid Win32 application"

The code i used for that is

ExecuteExeFile(string exeFilePath, string arguments)
{
try
{
Process ps = new Process();
ps.StartInfo.FileName = exeFilePath;
ps.StartInfo.UseShellExecute = false;
ps.StartInfo.Arguments = arguments;
ps.StartInfo.CreateNoWindow = true;
ps.StartInfo.RedirectStandardInput = true;

ps.StartInfo.RedirectStandardOutput = true;
ps.Start();
StreamReader MyStreamReader = ps.StandardOutput;
retStr = MyStreamReader.ReadToEnd();
ps.WaitForExit();
}
catch (Exception e)
{
retStr = "Error";
WriteLog("ExecuteExe :"+e.Message);
}
}

Is there any mistakes in this...
Any solutions............

thanks in advance

KARTHICK.K
Mail :: ka**********@gmail.com

Nov 21 '05 #1
0 1953

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

Similar topics

2
by: Jon Wright | last post by:
Trying to work around the lack of pexpect for native windows python I had a play with os.popen2 and some threads. This looks promising enough for what I want to do, but I hit on a problem with...
1
by: RL | last post by:
Hi all, I am new and am lost with Win32::Process stuff. I want on perl script to start a process, then another perl script to terminate the same process. I can start a process using......
1
by: Pradeep D | last post by:
Hi, We have a .net dll, which has a wrapper to command line tool. When we try to call we enocunter this error. When we execute the same command from command line it executes without error. Can...
1
by: Pradeep D | last post by:
Hi, We have a .net dll, which has a wrapper to command line tool. When we try to call we enocunter this error. When we execute the same command from command line it executes without error. Can...
3
by: Gil | last post by:
I need to create a web page in which its content should be controlled by some win32 application. this application may add or remove some gif images from the page and it should be smooth as possible...
17
by: asearle | last post by:
Hallo everyone, After playing around with 'fork' in order to try to get a one process to monitor another, I have changed my tack and switched to Win32::Process. Indeed, it looks like this...
3
by: jbenezech | last post by:
Hi All, I have a perl script which starts a java process using Win32::Process. Here is the code to start the java proces: Win32::Process::Create($ProcessObj, ...
3
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I am not sure what am I doing wrong here. I spend almost whole day working on this. I am trying to set focus on the process that I started by Process.start. Below is my code...
2
by: jake | last post by:
I am new to web development. I published a VS 2008 web page (default.aspx) file (along with its .cs file), using the "Publish Web Site" feature, to a Windows 2003 server that has all the .Net...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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...

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.