❔ How to wait for process to complete
i want to make program opens async but instead of giving 'hard coded' delays but i don't know how to use Process to wait for it to complete opening
A
Angius•397d ago
If you have an
async
method, simply await
itF
FaNim•397d ago
just set process.start as await?
A
Angius•397d ago
Ah, that's what you mean
F
FaNim•397d ago
yep
A
Angius•397d ago
No,
Process.Start
is not asynchronousF
FaNim•397d ago
ye i know but in all i mean that i want to start process and wait for it to complete run
completing openning i mean
A
Angius•397d ago
Process.WaitForExit()
would be one way
Process.Exited
event would be anotherF
FaNim•397d ago
but isnt it for when process is closing?
A
Angius•397d ago
Well, I'd assume that the process does exit when it completes
F
FaNim•397d ago
actually no
A
Angius•397d ago
How does that process signal completion, then?
F
FaNim•397d ago
iam making app to open as many apps as you want by one button and closing it by one button when you dont need this apps to be open
it dont
A
Angius•397d ago
Then the answer to the question in the title is "you cannot"
F
FaNim•397d ago
so how to make that signal you said about
A
Angius•397d ago
Do you have access to the source code of whatever that other app you want to run is?
F
FaNim•397d ago
nope :/
A
Angius•397d ago
Then you cannot
F
FaNim•397d ago
but what about that is it the java app?
A
Angius•397d ago
Does that Java app signal completion?
F
FaNim•397d ago
actually i have no idea
A
ACiDCA7•397d ago
look, if the apps you start dont have anything implemented that give you a signal that they are open and fully initialized, you wont know if the are completely open
if apps close they return a exitcode with which you would know when they are closed
anything else you are out of luck if it isnt your code
F
FaNim•397d ago
okay ye i understand
but there isn't any option to check for that through Process?
And btw is there any good documentation or article about Process class etc?
A
ACiDCA7•397d ago
you just know that there is a process running.. will it tell you if its still alive/open/whatever? no
as soon as you run process.start there will be a process but like you said, you want to know if its fully opened
F
FaNim•397d ago
hmm okay
A
Angius•397d ago
Process Class (System.Diagnostics)
Provides access to local and remote processes and enables you to start and stop local system processes.
A
Accord•396d ago
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
51KMembers
View on DiscordWant results from more Discord servers?
More Posts❔ Problem with including C DLL in a C# console app project.So I have this C DLL imported into my console app (.NET 5). I simply cannot get to call it correctly✅ Win Form Event Handlers questionHi, I was just wondering if there is an event handler when the win form is idle that I can then run ❔ Problem with Dictionary<ulong, Image> (Strange work of memory access)Concept of my system: A system that draws a picture with stickers, each of the stickers can be moved❔ How do I refactor this?I am working with a grid of tiles, each tile has an int, which is made up of 4 bytes which represent❔ [AvaloniaUI] Visibility of item in ListView based on conditionAn Avalonia UI application is used to manage an evidence of items. It allows the user to add items. ✅ How to structure this login/signup page layoutSo I have this mockup of the layout I want for a login/signup page in my Blazor WASM app. Pretty sta❔ I am need of help before I give up and run my code on a server instead of a serverless solution.I have create an azure function locally and i've used the selenuim webdriver package for taking scre✅ .Net Core 6 Asymmetric Encryption with custom public and private keysHello all! How can i use the `Asymmetric Encryption` in .Net 6 but choosing/importing private and pu❔ No Design in C#Instances of this bug (1)
1. View Call Stack
at System.Runtime.InteropServices.Marshal.ThrowExce❔ having issues on a reloading script on unity to reload weaponsthe code is used in a youtube video and i have pretty much copied to to get it to work but it doesnt❔ help with an exerciseI've encountered a weird problem that idk how to fix. Say we've got a string "31131123521" how do i ❔ Accessing HTTP Context at DbCommandInterceptor [.NET 7]Hi! I'm having some issues trying to access the HTTP Context at my DbCommand Interceptor class.
What❔ XMLAttributeCollection -> Dictionary with LINQ?It's a confusing class. It only allows turning it into a Queryable, but I have no experience with th❔ MS SQL Reporting Server URL Being RedirectedWe have an application from a vendor that was written in C# and we recently upgraded the MS SQL data❔ dataset memory leakI found memory leak and I don't understand how to fix it
Test case:
```cpp
public class MemoryLeaksT❔ WebAPI .NET 7.0 - Encrypt connectionstring in appsettings.jsonguys, I'm writing some WebAPI using .NET 7.0, and I'd like to secure the connectionstring with encry❔ how to read strings correctly with System.Data.SQLitei m trying read turkish characters from database but i can't see correctly❔ Blazor server app, base url / base page to set environmentHi 🙂
I have a Blazor Server app, where I would like to use some dynamic baseurl.
Say instead of my❔ C# Console Application -its only writing the same random string, how can i make it do different ones?❔ Rapid prototypingDo you feel there is such a thing as rapid prototyping or mvp development where you do things differ