# CreateProcess failure, error 2

the general solution to the problem that port "5037" is used can simply be:

adb nodaemon server
netstat -ano|finstr "5037"//the port may not be the same


in win7 64, when I run

adb start-server

but the result is  as follow

* daemon not running. starting it now on port 5037 *
CreateProcess failure, error 2
* failed to start daemon *
error: cannot connect to daemon
this means that the port "5037" is unused, that's to say the solution is not the same as the former

the solution:

the error CreateProcess failure, error 2:

windows error code 2 means: 2 The system cannot find the file specified. ERROR_FILE_NOT_FOUND
and from the source code this is after a call to CreateProcess() and the file name is given by GetModuleFileName()

in  AdbWinApi.dll, we can find the statement：
If that doesn't work, you will have to extract the .dll to your system directory. By default, this is:
<pre name="code" class="cpp">C:\Windows\System (Windows 95/98/Me)
C:\WINNT\System32 (Windows NT/2000)
C:\Windows\System32 (Windows XP, Vista, 7, win 8)

So, if you use a 64-bit version of Windows, you should also place the .dll in C:\Windows\SysWOW64\

• 评论

• 上一篇
• 下一篇