Click here to Skip to main content
15,887,746 members
Everything / Process

Process

process

Great Reads

by Dan Sporici
This article discusses the idea of Hot Patching C/C++ functions using Intel Pin in order to remove known vulnerabilities
by Afzaal Ahmad Zeeshan
Introduction and Background As the title suggests, this post is a personal recommendation for the users of Microsoft Cognitive Services, the services that provide a cloud-based subscription-based solution for artificially intelligent software applications, with an any team, any purpose and any scale
by Leonid Chashnikov
Discover an efficient way to implement document search using inverted index
by ASP.NET Community
The FileSystemWatcher is responsible for to track the updates of either file or folder/sub-folders, Suppose if I would like to continuously monitor a

Latest Articles

by Leonid Chashnikov
Discover an efficient way to implement document search using inverted index
by Bhargav Technical Lead
Angular migration to version 16
by ToughDev
Fix high Windows memory usage caused by large metafile

All Articles

Sort by Title

Process 

12 Jun 2012 by sigma_ivan
hi everyonei would like some help with the application that we developed.this is for our office use only, and what our app is doing is extracting the text from the pdf file using pdflibnet.dllbut we lately encountered a problem with a particular pdf file.the problem is when we try to...
5 Aug 2019 by Md Athaulla
I'm running the dotnet code generator commands from C# (using Process class), I'm able to create project using dotnet new mvc and I'm also able to add nuget packages. But I'm not able to scaffold when application is running. Scaffold happens only when I stop solution. Process p =...
5 Aug 2019 by #realJSOP
You can't scaffold while the app is running, because it would have to modify the project in order to complete said scaffolding.
9 Dec 2012 by Jackie00100
As the title says! can I force a method/function to run on an other process without going too much into assemblies/decompiling etc.?I'm having a app that is in need of doing some very heavy memory work with some graphic objects using GDI+, (up to ½-1 GB) so I want to have this to run in a...
9 Dec 2012 by Sergey Alexandrovich Kryukov
There is no such thing as "force" to run something to "run on a single process". Processes are totally under your control. If you don't create a process, it is not created by anything by itself. And using GC is not recommended.Your "without going too much into assemblies and stuff like that"...
6 Sep 2016 by TatsuSheva
I did this code and I put in a timer in order to check if the exe is open or closed.I create a class and put it inside and then call it after in Winforms.Here is the code:private static WINDOWPLACEMENT GetPlacement(IntPtr hwnd) { WINDOWPLACEMENT placement = new...
6 Sep 2016 by xXxRevolutionxXx
When an executable is open in the system... there will be a process with the exact same name as the file. For example if you are looking for an exe file which is called: SystemCleaner.exe you can find it as a process with the name: SystemCleaner.Accordingly if the file name has a space, for...
23 Jan 2023 by leone
Hi, My problem is that I cant send my custom object to OutputDataReceived method. Details: I have a class called Material which includes properties such as URL, Title, Description etc. Now I start a Process. My goal is to take Title by using...
23 Jan 2023 by leone
Ok I did it on my own: Material m=new Material(URL); process.OutputDataReceived +=(Object _sender, DataReceivedEventArgs _args)=>DoSomething(m, _sender, _args); public void DoSomething(Material mt,object sender, DataReceivedEventArgs e) { ...
17 May 2023 by Bhargav Technical Lead
Angular migration to version 16
20 Apr 2017 by Dave Kreskowiak
I think this is off-topic for this site. You should be looking for a site that specializes in Salesforce, or even the number supplied in your support contract with them.
14 May 2019 by Member 14367686
hi. i have some problem when i process python on monodevelop C#. at first , my program is launching on C# ( ubuntu Monodevelop ) and i want to process some python program ( by using bash ) it was done. i`ve succeed to process my python program by using 'Process' class but when i get result of...
14 May 2019 by Gerry Schmitz
Your bash and console are both writing to "standard output"; get one to write to something else (e.g. std error). Not sure how sophisticated these components are. Process.StandardOutput Property (System.Diagnostics) | Microsoft Docs[^]
14 May 2019 by Richard MacCutchan
You cannot control how much data will be received each time without some method of synchronising the two processes. As it stands they both run independently and so the system will decide when each one can read or write some data.
7 Nov 2011 by Kalyani Kailasamoni
HiIn a C# application, how do I bring the instance of an application that was created using Process.Start() to the foreground? ThanksK
7 Nov 2011 by OriginalGriff
Try: [DllImport("User32.dll")] private static extern bool SetForegroundWindow(IntPtr hWnd); private IntPtr handle; private Process process; private void button1_Click(object sender, EventArgs e) { process =...
7 Nov 2011 by LanFanNinja
Solution 1 will work just fine for your need. But I just wanted to add that if the windows happens to be minimized you will need to use something like this:[System.Runtime.InteropServices.DllImport("User32.dll")]private static extern bool SetForegroundWindow(IntPtr...
4 Sep 2012 by Kalyani Kailasamoni
Thank you for your responses. I tried the solution mentioned above, with my application. Still I am not able to bring the newly created process to the foreground, it is still in the background. When I spawn the new process with cmd.exe using the solution provided, it does bring the command...
24 Aug 2016 by ShlomiO
Hi, had the same problem, hope this will help:The trick is to make windows ‘think’ that our process and the target window (hwnd) are related by attaching the threads (using AttachThreadInput API) and using an alternative API: BringWindowToTop.Forcing Window/Internet Explorer to the...
29 Jul 2012 by sunder.tinwar
Hi Guys,I was just creating a small tool to execute shell commands on remote machine and get output and errors.I am running my application under all privileges.Example : I should be able to run dir /a on remote machine and get output and so on for other commands.I just browsed...
29 Jul 2012 by Zoltán Zörgő
Look here: Create a Remote Process using WMI in C#[^]
9 Feb 2012 by aspire1337
Hey,wenn running this command from cmd:c:\windows\explorer.exe "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}"printers and faxes open, in an own process (2. explorer.exe) with only this window.When i...
10 Feb 2012 by Martin Arapovic
Hi,Use ProcessStartInfo and set CreateNoWindow and UseShellExecute to desired values depending what you want to achieve.Explore this links:1. CreateNoWindow in combination with UseShellExecute[^]2. ProcessStartInfo Class[^]
20 Jul 2013 by hamed1991
hello all, How do i hide my application process from task manager process list using c#?or even can in lock my application precess in task manager. in fact, when a user try to kill my application process, he force to enter a password. Please someone help me.
20 Jul 2013 by Thanks7872
Its not that simple as you think.Well,refer to these links to have idea regarding the same.How do I hide a process in Task Manager in C#?[^]Hide a C# program from the task manager?[^]Regards..:laugh:
3 Oct 2018 by Dinesh Kumar Dora
Hello friends, I know checking the process existence by name or PID, but in my scenario, i need to check the process is running or not, with the help of Process description. Is there any way or workaround to do this? In my scenario i have to detect whether a Suite installer by Process Name...
3 Oct 2018 by #realJSOP
You can't use the PID because it's assigned by the system when you execute the process, and therefore it is highly probably that it will be DIFFERENT every time the process runs. You shouldn't use the description, because that could be changed by a developer between executions. You SHOULD use...
31 Dec 2014 by Samuel Dudík
Hello. I'm working on a program and I need to pass arguments to a process (process.startinfo.arguments), but the problem is that the process is already running. How do I acomplish this? Thanks!
31 Dec 2014 by Sergey Alexandrovich Kryukov
You cannot do it to an arbitrary already running process using command-line arguments. The process has been started already and those arguments are already obtained and processed at this moment. It's too late to change its behavior.However, you can design your process in some special way to...
6 Oct 2016 by maurodefilippis
Hi, I'm bulding a c# application who make some operation and start one or more external application withstring pathMyApp = ......external executableProcessStartInfo startInfo = new ProcessStartInfo() { FileName = "pathMyApp", Arguments = ......someAppParameter, };proc = new Process()...
6 Oct 2016 by OriginalGriff
Processes and Threads are different in one important respect: when your application closes, all it's thread are closed as well provided they are marked as "background" - if they aren't, then they persist even once the app itself is closed. The only way to override that is to call...
5 Dec 2020 by Elias-Traunbauer
Hey! I have a problem with my C' Program. My program is some kind of C Online Compiler. It reads a source file, compiles it and then runs the file and the user should be able to give the Program an input. The compiling part works. But when I...
5 Dec 2020 by charles henington
Gerry Schmitz[^] is correct. You will need to change "mypath" to the actual path of the executable.
24 Feb 2012 by Dreamcooled
HiI've a problem with Unrar (called as C# process).(I know there are several implementations for C#, but the most of them are buggy or they haven't the functions I need.)As soon as I redirect one of the standard streams, Unrar skips all inputs (like passwort requests) and exits. But I...
24 Feb 2012 by wizardzz
I think you should reconsider why you are doing this then:p.StartInfo.RedirectStandardInput = true;Have you tried setting to false?Update:http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.redirectstandardinput.aspx[^]Following the example here, are...
27 Feb 2012 by Dreamcooled
Well, I couldn't solve the Problem. The 7zip commandline tool has similar issues.I've modified the provided C# Wrapper for the Unrar.dll, which can be found in the download from their side. It seems as if I could customize the wrapper to my needs (as a Workaround for the Problem).
13 Jan 2012 by BoggleKing
Hello,I would like to know how to query for a process's owner in (or via) C#. I've tried the example at http://www.codeproject.com/KB/cs/processownersid.aspx.WMI:Can query all process and their owners, but it's far too slow.WIN32:Fast, but I get a permission denied exception when...
15 Jan 2012 by BoggleKing
The following is as far as I've gotten. If you create a user called sampleuser and do a "run-as" on Notepad as that account, the following code doesn't show sampleuserusing System;using System.Collections.Generic;using System.Linq;using System.Text;using...
16 Oct 2014 by EdisonMecaj
I'm not a pro in code writing and C# programming. I wrote a simple app to read from process memory using the ZeraPain script ReadProcessMemory(). Is working good with the 4 bytes and 8 bytes value. The other function of this App is that can read strings, but i really need to read Double values...
27 Mar 2013 by metastruct
When WebClient, HttpRequest, and all else fail, BITSadmin solves your download woes
3 Aug 2022 by Mohammad Tavoosi
I want to execute an external file and do something when the file was closed but Process. WaitForExit() Method does not work and return null Exception please help me. What I have tried: Process ExecFile = Process.Start(FilePath); ...
29 May 2020 by OriginalGriff
It depends on what is in your FilePath - if it's the name of a data file (.jpg for example) then the process isn't necessarily kicked off by the "run this" request - the system decides what app to run and if there is a single app it may kick it...
29 May 2020 by phil.o
This means that ExecFile is null at the time you are calling the WaitForExit() method. According to Process.Start Method (System.Diagnostics) | Microsoft Docs[^], it could be thatA new Process that is associated with the process resource, or null...
4 Oct 2017 by MrJack Mcfreder
I am new to C++ and it is just a pain in the ass to find a single working example of reading process memory. What I have tried: After hours of googling, I eventually found a glimmer of hope for this code: // ConsoleApplication4.cpp : Defines the entry point for the console application. // ...
4 Oct 2017 by CPallini
Quote: I am new to C++ and it is just a pain in the ass to find a single working example of reading process memory. That's a hint your are trying to do something too difficult for your current knowledge. You should start reading the documentation: ReadProcessMemory function (Windows)[^],...
4 Oct 2017 by User 59241
I think CPallini's comment is apposite however there are many examples to be found by googling. This: How to use ReadProcessMemory in C++?[^] leads here: Stealing Program's Memory[^] which may give you a start.
7 Apr 2014 by Member 10559635
Hi all, i have a problem with my c++ RunPe.I'm using native c++ as the stub, and i want to run from memory even native or managed exe.If i run native exe my RunPe works fine, but if i try to run managed exe from memory my RunPe crash.I want to use native c++ because my stub must run on...
8 Apr 2014 by Member 10559635
Hi Sergey and thanks for the reply.So this is the situation :the Stub is a 32 bit Win32 application (native).if i put a native exe (32 bit console or Win32) in the stub (as resource) the stub can lanch the native exe from memory.if i put a managed exe in the stub, i get...
28 Jun 2012 by vantoora
Hi folks,I'm programming a little application to run "windows defragmentation" within c# code and then log the result and send it by mail.I have finished to make it on my machine (running XP PRO SP3), but when I run it on a machine running Win2000 and Win2008 it throws error ("specified file...
29 Jun 2012 by vantoora
Hi,I think I found a solution for my problem.It seems to work but I'm still testing.Following are the things I made, in case someone else will encounter similar problem : 1. for the "StartInfo.Arguments" argument was : "/A :" I changed it to " /A :" (with the space before) 2. I...
23 Dec 2013 by The Doer
I have a VB .net Windows application and on certain click i want to open a VB6 application , I used "Shell" to open the VB6 exe successfully but its obvious opening the login page. As the user entered the login credentials in the VB.net application already I don't want user to key in the...
24 Dec 2013 by Dave Kreskowiak
Since the VB6 app has no clue what a SecureString is you can't use it to pass the password as a parameter. VB6 can't decode it. You have no choice but to pass the string in clear text.The UserName and Password fields in the ProcessStartInfo class are only used to tell Windows who to launch...
16 Jan 2012 by MayFlyJJ
Hi all,its my first time posting a coding question.. I am getting crazy with the following case (searching the internet for a couple of days):I want to open SSH connections from c# via opening a process and running plink. All output should be collected and depending on the results the...
17 Jan 2012 by Sergey Alexandrovich Kryukov
You can use System.Diagnostics.Process.Start with re-directed output streams StandardOutput and StandardError, please see http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^].You can find a code sample with redirection here:...
17 Jan 2012 by MayFlyJJ
Hi,thanks for the suggestion. Unfortunately I was not precise with my explanation: I am using a Process with asynchronous redirection of StandardOutput and StandardError, but I have no idea how to capture the other output send to the cmd process.thanks!
8 Jul 2013 by salders
I've encountered the same issue. You can capture ALL of plink's command-line output by executing it through a windows shell script. eg.Set objShell = WScript.CreateObject("WScript.Shell")Set objExecObject = objShell.Exec("cmd /c C:\tools\plink -load "& WScript.Arguments(0) &" "&...
18 Sep 2010 by moshe.h
I'm making a call to psftp.exe from inside my C#/.net 2.0 winform app: private void FtpUpload(){ Process psftp = new Process(); psftp.StartInfo.FileName = "psftp.exe"; psftp.StartInfo.Arguments = "XXX.XXX.XXX.XXX -l username -pw password -be -b " + batchFileName...
21 Sep 2010 by E.F. Nijboer
It looks like you are doing the operation from within the main thread and therefore blocking the application messageloop. This would also mean that if the operation takes to long, you would get the message that the program isn't responding anymore. A solution is to implement some threading or...
12 Nov 2021 by Ṉobody
I am developing an application to monitor new running processes before the main thread starts running. The problem is that the code below is executed when all threads in the process are loaded and the process is doing its job. I want to do...
7 Feb 2013 by punk_legend
I've recently updated our PCs to run Windows 7 32-bit from Windows XP. The code I had used in the past has stopped working and I was wondering what I could do to get it working again. FileStr.Format("Microsoft Excel - %s [Read-Only]", pathStr);HWND hWnd= ::FindWindow(NULL,FileStr);if...
10 Feb 2013 by KarstenK
Check for the windows version and do it the "Windows 7" way.Use Spy++ to detect the right name of the excel-doc
28 Mar 2013 by Sayyed Mostafa Hashemi
HiYou must check Process in Task manager by VC++ and use for statement. use GetmoduleFilename and GetModuleHandle.
9 Jun 2012 by user_code
Hello,I write a code and using MFC.I want to check if process exists or not.for example:if (myProcess.exe exists) do somethingelse do something elseHow can I do it?Thanks
9 Jun 2012 by krumia
See if this helps:http://msdn.microsoft.com/en-us/library/ms682623(VS.85).aspx[^]
9 Jun 2012 by Aescleal
If the process you're looking for has a GUI then you can use FindWindow to see if the window exists. If it does, the process is running. If not it doesn't necessarily mean it's not - it could be running in a different window station.If you can modify the source code for the process you want...
10 Jun 2012 by Vitaly Tomilov
I did process enumeration and searching for a process in my article here:Professional System Library: Introduction[^]You will see that the demo itself lists processes, and allows you to kill one.
28 Feb 2014 by _Ravikant Tiwari_
This program will demonstrate the process of injecting code into already running processes. Here we have choosen to inject into Explorer
7 Mar 2014 by _Ravikant Tiwari_
Code Injection - A Generic Approach for 32bit and 64bit Versions
31 Jan 2014 by Dinesh1911z
I have been trying to use fork and pipe to enable two communication between a parent process and 2 child processes.This code works perfectly when I use one child process, but if I use two, I am not getting sent between the parent and child process #2. It simply prints the first two messages...
5 Apr 2010 by Mahdi Mansouri
This program shows you how to control, give set-point and get feedback from Hua YI made Power Supplies
3 May 2017 by raddevus
Some thoughts on Software Development, the SDLC and Process.
7 Feb 2013 by Robert Clove
Hello All,I am having a trouble that i want to use the code of live 555 libraries in a thread but according to there documentation from the link http://www.live555.com/liveMedia/faq.html#threads[^]Is this code 'thread safe'? I.e., can it be accessed by more than one thread at the same...
7 Feb 2013 by Matthew Faithfull
Yes I have come accross a very similar issue to this. There is a way but it's not very clean. Instead of using Live555 directly use FFMPEG which includes Live555 internally. You can then use multiple threading if you follow one absolutely strict rule.Only allow one thread at a time to run...
8 Feb 2023 by Dave Kreskowiak
Your code, running as your account, cannot intercept calls being made by another account, or an elevated account. This is for security reasons. Think about it. Would you want some schmuck user intercepting code running as administrator and...
8 Feb 2023 by Ṉobody
I am creating an application where I use EasyHook to hook into the explorer.exe process and listen for the CreateProcessW method call from kernel32.dll. The program intercepts CreateProcessW only if the user runs the file by double-clicking on it...
11 Jan 2021 by Benktesh Sharma
How to create, modify and update Docker image from container
22 Mar 2016 by Chandrasekhar Telkapalli
Understanding the User Business Process,analysis on benefits of doing Automation and best approaches & practices in designing the solution
2 Nov 2012 by pWouter
Hi all,I'm building a windows form application (in C# 4.0) which starts an external program (via process.start etc.) Is there a way to detect whether this external program creates any files/folder, and if so where? I've looked into process.StandardOutput, but this doesn't seem to be it...
2 Nov 2012 by Abhinav S
The FileSystemWatcher class[^] is perhaps what you are looking for.Here[^] is a good article to help you get started.
29 Nov 2011 by Matias234
My app continues to freeze when I launch a new activity from a certain previous amount. For example, I have 2 activities that I had to start before I can get to the one I need. I was just wondering wheather the avd can only take so many activities in the background before the applications...
25 Jun 2011 by se.nishant
// I want dir command to execute in project folder which means I want that this will show the files of project folder...using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace filehider{ ...
25 Jun 2011 by Sergey Alexandrovich Kryukov
There is no such things as "dos command" in Windows. What are your trying to do in ASP.NET makes no sense at all and would be extremely bad in general.You need to use System.IO.Directory.GetFiles, see http://msdn.microsoft.com/en-us/library/system.io.directory.aspx[^].There is a little...
25 Jun 2011 by Espen Harlinn
You may find this article to be of some interest:File System Browsing in ASP.NET: New Approach vs. Old Approach[^]Best regardsEspen Harlinn
1 May 2020 by honey the codewitch
This tip demonstrates how to create an app that only allows one instance to run at a time
2 Jun 2012 by Ben Baron
Java source code to demonstrate Executable Integration which is a concept of integrating several distinct executables to create a single application
11 Jul 2011 by quyps
Hi allIn my main process, i create a ffmpeg child process using CreateProcess(...).I need to track the status of converting progress to update a progress bar. To do it, I read text from ffmpeg output and extract progress status from it.I make a sample programm like this: HANDLE...
12 Jul 2011 by Albert Holguin
The way to handle this would be to have the GUI and the read file in different threads, whenever there's an update, use PostMessage() to send an update to your GUI thread and let it display to the window. That way there's no blocking between either thread.
22 Oct 2020 by link1234
Hi I want to check witch programing running in user windows or Linux in my Program. I use the below code, However this code show me every process name even the services. But I don't want the services name. I only Want the program user running....
7 May 2023 by ToughDev
Fix high Windows memory usage caused by large metafile
27 Jul 2014 by kplohit007
What will be the output..??Will child process is still be able to read the file..??#include"stdio.h"int main(){ FILE* fd; char buf[20]; fd = fopen("myOS", "r"); /* Checks for open success */ if((fork()) != 0) { fread(buf, 1, 10, fd); buf[5]='\0'; ...
28 Jul 2014 by pavanreddy61
Output is : Parent : xxxxxThe fork command actually creates a child process, and returns the PID of the process to the parent, and a value of zero to the child. In this example, the first block of code is executed by the parent, while the second block is executed by the child. The one thing...
23 Apr 2013 by Sabri M
is there anyone can tell me how can I write to the same file opened by parent and child?example:int main(){ pid_t pid ; FILE *inp = fopen("test.log","w"); pid = fork(); if(pid == 0) writeFile(inp); else writeFile(inp);}
23 Apr 2013 by CPallini
In priciple you can, but that's 'the recipe to disaster' according to Multiple processes write to the same file (C)[^].
5 May 2014 by Sergey Alexandrovich Kryukov
I just want to inform you that this post is automatically removed due to abuse reports from some members. It is really inappropriate, not a question.—SA
28 Aug 2017 by SebG.Net
Hi. I want to use VB.net to execute a program (*.exe file), wait till it finishes and get the return value the *.exe program returns. Now I did accomplish this using the code bellow however the error code i get the first few tries is correct but then i keep getting 0xCDCDCDCD as the error...
3 Mar 2011 by Henry Minute
The Process class has an ExitCode property. Example here[^].I think that is what you need. :)
23 Feb 2014 by mjal_146
I want to run a process in java and get the file that was saved from that program .For example, I want to run Photoshop or MSpaint, wait for the user to finish editing and, after saving, to get the file (jpg, png, etc) or at least the path of the file.public static void main(String...
25 Feb 2012 by mohammadghaderian.bp
HiIF I want to delete a *.exe file that it has a process running I can delete it.before deleting it I should Kill Its process ?How can I get process of *.exe file that I have only adress of Its File ??Thanks a lot.
25 Feb 2012 by Chandrakantt
You can do opposite, that is you can get list of running process. Get path of the executable file of this ruunig process, if the path of process is same as our file path name, then kill the process. I have written a code below which shows how to find the process and kill it. I have just modified...
17 Dec 2014 by Konstantinos Karakatsoulis
Hello, i wrote this loop to get all processes by using Process.GetProcesses() foreach (var currentProcess in Process.GetProcesses()) { bool is32bit = false; IntPtr hprocess = OpenProcess((PROCESS_ALL_ACCESS | PROCESS_VM_OPERATION |...