Help Using Diagnostic.Process Object

  • Thread starter Thread starter Ram
  • Start date Start date
R

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
 
Ram said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top