win32-process

WMI Win32_Process.Create fails with Insufficient Privs

I'm trying to run a simple cmd utility on a remote Windows server from within a vbscript by invoking the Win32_Process class, like so: serverIP = "10.0.0.3" Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & serverIP & "\root\cimv2:Win32_Process") RunCommand = "cmd.exe /c echo hello >c:\hello.txt" wscript.echo RunComm...

How to start script(vbs) with WMI in C# code?

I need to start a Visual Basic script file by using WMI in a c# code. I don't quite understand what is wrong with this piece of code? Result will be always 8 (Unknown failure). But for example notepad.exe can be started without failure. //Get the object on which the method will be invoked ManagementClass processClass = ...

Powershell - calling remote WMI objects - RPC error HRESULT: 0x800706BA (RPC server not available)

Hello, I've got some troubles with Get-WmiObject and usage of this object. In case, I'm connecting to remote computer - which is not in AD, but in the internet. I'm using credentials and I'm able to retrieve list of WMI classes, or object (to be specific, I want to work with Win32_Process) via commands: $credential = Get-Credential $...

GetMessage() ,for reading message from message queue.

I am using PostThreadMessage() & GetMessage() for sending data to the queue and reading data from the queue.But i want to check whether that data is in queue or not.can u tell how it will possible to check that which i was sending by PostThreadMessage(). ...

Using 'CreateJobObject': on VC++2005 + Win XP SP2

Hi, Are job kernel objects only available on Win2000 ? I am getting compiler errors for:- HANDLE hJob = CreateJobObject(NULL, NULL); error C3861: 'CreateJobObject': identifier not found Please suggest. ...

Getting executable file name from handle in Windows x64

I have a c# application that is compiled as x86 so it runs as a 32bit application on Windows 7 x64. While the application is running, I need to detect the executable name of the active window. On Winodws XP the following code worked fine (getting the process filename from the active window handle). On x64 it reports the name of only the ...

how to use WMI to discover a running batch (.bat) filename?

Currently with WMI's Win32_Process, I seem unable to detect if a batch file is currently running all it lists is CommandLine of cmd.exe, without telling me which batch file that particular cmd.exe is running. Anybody have any insights there? code snippet (ruby-wmi) many_args = 'batch_file.bat' procs = WMI::Win32_Process.find(:all) pro...

Is Export table contains all entries of Win32 Exe functions?

Hello, I need to know that all Win32 Exe functions or class's member functions contained inside Export table of that Win 32 exe(PE File)? If not then from how and where I would be able to get all these information? (I know PE file format and all sections of it and know what those sections contained but still help required how to procee...

How to implement progressbar(to show progress) using threading concept in win 32?

I am trying to show a progress bar while my process is going on...in my application there will be a situation where I gotta read files and manipulate them(it will take some time to complete)..want to display a progress bar during this operation..the particular function I am calling is an win 32 ...so if you check my code below i am upto ...

Alternatives to NtQueryInformationProcess for detecting undead processes?

I'd like to detect when someone terminates a suspended debugged process without informing the debugger. (For example, get to a breakpoint in a console app, and close the app's console window.) The process goes into a zombie-like state and cannot be interacted with further until the debugger releases its hold. This state appears to set t...

How can a program tell if another process is running as a service?

I have a Win32 program which I can direct to monitor another Win32 process. I want to find a way for the monitoring program to determine if the monitored process is running as a Win32 service. Not all services run as SYSTEM and not all services have services.exe as a direct parent, so I don't regard these obvious techniques as being ro...

Identify which executable is throwing a runtime error

I have a program that is throwing a run-time error dialog. Is there a way to programmatically detect which executable is the parent of this dialog box from another process? ...

use Win32::Process; My output reports The system cannot find the path specified.

Hello, I am relearning Perl after about 10 years of non use. I did a copy and paste of the two scripts below from one of the answers for a similar question on this site. I have checked and double checked the 'path' and tried several deviations, but I still get the same answer -'The system cannot find the path specified'. Any help would...

How do you capture Console I/O (not stdio) in Windows?

Why would I want to? Because I'm writing my own cmd.exe replacement! I can CreateProcess and pass in handles to pipes for stdin and stdout and stderr, and I see how I can AllocConsole, FreeConsole, and AttachConsole, but how do I tell child programs that my program is the console? More detail for clarification: I've got a window that ...

Calling cxfreezed exe of a python script as an independent process in windows

In windows i m trying to create new process and got stuck while spawning an independent process using win32process.CreateProcess I have freeze my python script using cxfreeze to make .exe. By using following command i tried to create a new process which would do some tasks. si = win32process.STARTUPINFO() details = win32process.Create...

Is there a way to have a process created by CreateProcess open within another window?

Hello, I want to be able to open a GUI application using CreateProcess in a main process and have the GUI display in a window I create from within the main process. Does anyone know how to achive this? Thanks! ...