473,386 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,386 software developers and data experts.

Help Using Diagnostic.Process Object

Ram
Hey,
I'm trying to use the "gacutil" exec to register an assembly form an aspx
file
using the Process Object.
Here's the code:

Dim objProc As Process

objProc = new Process()

objProc.StartInfo.FileName = "gacutil.exe"

objProc.StartInfo.WorkingDirectory
="c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322"

objProc.StartInfo.Arguments = "/if c:\aaa.dll"

objProc.StartInfo.RedirectStandardOutput = true

objProc.StartInfo.UseShellExecute = false

objProc.Start()

objProc.WaitForExit()

When getting to the "start" line, I get the following Exception:
"System.ComponentModel32.Win32Exception: The System Cannot Find The File
Specified"
But!, when I remove the - "RedirectStandardOutput" and the "UseShellExecute"
lines, the function works like a charm!
Any ideas would be greate!
Thanks ahead

--Ram

Nov 21 '05 #1
1 1438
"Ram" <ni***@bezeqint.net> schrieb:
I'm trying to use the "gacutil" exec to register an assembly form an aspx
file
using the Process Object.
Here's the code:

Dim objProc As Process

objProc = new Process()

objProc.StartInfo.FileName = "gacutil.exe"

objProc.StartInfo.WorkingDirectory
="c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322"

objProc.StartInfo.Arguments = "/if c:\aaa.dll"

objProc.StartInfo.RedirectStandardOutput = true

objProc.StartInfo.UseShellExecute = false

objProc.Start()

objProc.WaitForExit()

When getting to the "start" line, I get the following Exception:
"System.ComponentModel32.Win32Exception: The System Cannot Find The File
Specified"


Are you sure you want to do this on the server machine?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

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

Similar topics

1
by: DOT NET JIM | last post by:
in VB6 the api declares the createprocess lbEnv var as any. When converted to ..NET is change the type any to Object. The problem is, what kind of object. I can not get the env variables set when...
2
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line...
138
by: ambika | last post by:
Hello, Am not very good with pointers in C,but I have a small doubt about the way these pointers work.. We all know that in an array say x,x is gonna point to the first element in that...
1
by: FredC | last post by:
This works: private Process oneProcess = new Process(); oneProcess.StartInfo.FileName = @"C:\oneProcess.exe"; This gets a 'System.NullReferenceException', Object reference not set to an...
20
by: RWC | last post by:
Hi Folks, I have a windows 2000 server installation, IIS is running and the ASP.NET 1.1 SDK has been installed. I'm reading a book on ASP.NET and the lessons call for the first line to read <%@...
1
by: brian | last post by:
I have a vb.net app using a shell command because I can't figure out how to use the string with the system.process.start. I would like to convert it so I can do a little error checking to...
5
by: Andrew | last post by:
Hey all, Requesting help from the VB.Net gurus in here. I was given a task to write a Windows Service (VB.Net) that would run an external program, and if that program closed for any reason...
10
by: salty | last post by:
.... when no one here has an answer? Does MS offer support for its programming products where that support doesn't cost an arm and a leg, but where you can at least get a response? I'm not...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.