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

Problems with the Process.Start()

Hello World, :D

I have a problem that it is making me crazy, I hope you can help me.

I'm trying to execute a .exe file with the Procces.Start, and there
is no problem when the file is on my computer, the problem comes when
the file is in a network drive.

The most amazing thing is that in one computer I can
execute my .Net program without problems independently if the file is
in a local or in a network drive, but in others computers I have
problems when the programs execute the Process.Start().

· If I pass the path in this mode:
\\hermes\hermes\temp\test.exe, I have the following problem:
The programs hangs into Process.Start() instruction.

· If I pass the path in this mode: I:\ temp\test.exe, I have
the following problem: (I: is a network drive mapped to
\\hermes\hermes)
The programs enter in the catch section and throw the
exception: "The system can find the specified file"

In the computer that I have problems I execute the file from windows
making:
Start/Execute: and I write I:\ temp\test.exe and the antivir starts and
give a message saying: the publisher can't not be identified. Are you
sure you want to run this software? I say yes and then the file can
execute without problems

In the other computer I make the same:
Start/Execute: and I write I:\ temp\test.exe and I don't
have any problem the file executes without problems.

I don't know if the Antivir can be a problem, and if it is, how can
I resove? There is any parameter in the Process method to resolve this
security's problems??

Other diference between the computers is ths one of them is XP, and
the other is 2003server, my problems are in the 2003Server.
The code is the following:

public override void Handle(Context ctx)
{
try
{
Process myProcess = new Process();
myProcess.StartInfo.FileName = ctx.getString("command");
myProcess.StartInfo.Arguments = ctx.getString("arguments");
myProcess.Start();
//We wait until the process finish.
while (myProcess.HasExited == false)
{
System.Threading.Thread.Sleep(100);
}
}
catch (Exception e)
{
Log.error(e.ToString(), e);
throw e;
}
}

Bye and thank you a lot for you attention. :D

PD: Sorry for my bad English. ;)

Apr 6 '06 #1
0 2204

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

Similar topics

0
by: Stephen.Haeney | last post by:
I am deveeloping a WinForm application where I need to display a HTML page to the user. I would like to use IE to display this page then wait until they have closed the IE window before continuing...
0
by: CMG | last post by:
I am trying to run gocr from my program, and use the output. I have done this with success befor, with a workaround command line tool.: Private irfanview As String = "C:\program...
7
by: Mr. Mountain | last post by:
In the following code I simulate work being done on different threads by sleeping a couple methods for about 40 ms. However, some of these methods that should finish in about 40 -80 ms take as long...
11
by: Glen Wolinsky | last post by:
This is my first attempt as asynchronous processing. I have created a small test app as proof of concept, but I am having one proglem. In the example (code listed below), my callback routine has...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
2
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 ...
4
by: Christian Billig | last post by:
Hi, well i've a problem and i don't know how to solve it. I wrote a function, which starts a Process for a user by using the API CreateProcessWithLogon. Afterwards i want to know if the...
3
by: Jay | last post by:
hi i am jay from bangalore i have one problem ,can u please help me out. i have one windows application and one windows service. from windows application i have to call one process "gpg" to...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.