[ACCEPTED]-Is there any way to start process in suspended state?-windows-xp
I'm not exactly sure what you're trying 14 to do from your question, but maybe using 13 the ntsd debugger which comes with XP will 12 help you do what you want (by default, ntsd 11 will load the process and stop at the first 10 instruction).
From the updated information 9 in your question, I'd suggest downloading 8 the Debugging Tools for Windows package from Microsoft and debugging the startup 7 stuff in WinDbg -the are some things that 6 Visual Studio is better at, but there are 5 also some things that WinDbg is better at 4 than Visual Studio (WinDBg is a very powerful 3 debugger).
Or you can simply load the program 2 in the Visual Studio debugger (without a 1 solution) from the command line:
devenv /debugexe yourprog.exe <arguments>
You can easily write an application which 9 will do it for you. Use the CreateProcess() function, set 8 CREATE_SUSPENDED flag in the
For 7 your specific task the application could 6 do the following: call CreateProcess() to 5 start the application and check the error 4 code, then call MessageBox() to tell you 3 to attach the debugger, then after you've 2 pressed a button on the message box (MessageBox() returns) call 1 ResumeThread() to resume the application.
I've been asking myself this same question 4 for a while now and just now found this 3 pretty neat little tool that will do exactly 2 what you (and I) want. You can get just 1 the binary, or the source too.
Regarding lightweight 3rd party tools:
SysInternals 5 Process Explorer:
…allows you 4 to Suspend and Resume proceses. It can't 3 "launch" them suspended, but may 2 be useful to your purpose anyway. It's 1 a free download.
More Related questions