question

mionshion-3520 avatar image
0 Votes"
mionshion-3520 asked DanielZhang-MSFT answered

process.hasended issue can not find process even know process is showing in taskmanager.

good morning all,

have been trying for 2 days to resolve this issue i trying to get my program to wait for the install of Microsoft office to install,

before i open word or PowerPoint ect but when i start it instantly says process is not running i have checked over the naming and made sure i not made any mistakes,

i have tried 2 different ways but still to no avail,

code i have is,

OfficeC2RClient.exe
Microsoft Office Click-to-Run Client

code and picuture examples,
www.pastebin.com/FZf7Wy2w

dotnet-csharp
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

this is the code i have and using alone with pictures of the issue however could not post on here because issue with firewall or something on here

0 Votes 0 ·

How did you check that the process is running?

0 Votes 0 ·

1 Answer

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered

Hi mionshion-3520,
The Process.Responding property is used to indicate whether the user interface of the process is responding.
And if a process has a user interface, the Responding property contacts the user interface to determine whether the process is responding to user input. If the interface does not respond immediately, the Responding property returns false.
Try to remove it in your conditions to see if you can get the process.
You can also try to use Process.GetProcessesByName method.

 Process[] pname = Process.GetProcessesByName("OfficeC2RClient");
 if (pname.Length == 0)
   MessageBox.Show("nothing");
 else
   MessageBox.Show("run");

Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.