System.ApplicationException: Unable to run internal command

Jun 24, 2010 at 2:15 AM

Hello,

i'm currently trying to make a little test program using easyhook. Unfortunaly i've got a problem and i don't understand it...

i try to make more or less the same example that fileMon.exe. unfortunaly on the Config.Register i receive an exception :

System.ApplicationException: Unable to run internal command. ---> System.ComponentModel.Win32Exception: The system canno
t find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at EasyHook.Config.RunCommand(String InFriendlyName, Boolean InWaitForExit, Boolean InShellExecute, String InPath, St
ring InArguments)
   --- End of inner exception stack trace ---
   at EasyHook.Config.RunCommand(String InFriendlyName, Boolean InWaitForExit, Boolean InShellExecute, String InPath, St
ring InArguments)
   at EasyHook.Config.Register(String InDescription, String[] InUserAssemblies)
   at consoleManager.main.Main(String[] args) in C:\svn\project\WindowsFormsApplication1\Project1\main.cs:line 70

i don't understand which file it talking about... my binary is here and signed and my dll to inject is here too. If i move them, the exception change.
Do you have a clue ?

i'm running on win7 x64 and what ever the dll i try to hook, it's the same.

thanks,

Jun 24, 2010 at 9:17 PM

hi,

 

i figure out what was missing, it was the service with a bad name in fact ... it's looking for EasyHook32Svc.exe instead of EasyHookSvc.exe on x64 architecture it seems.

 

but i have another problem. i don;t figure out how to compile the EasyHook64.dll.

when i try to compile for x64, i'm getting EasyHook32.dll but not the 54. and if i rename it. it doesn't work :/

 

is there anyone else with the same problem ? or is it a bug ?

 

i will post a new message for this problem.

Jul 2, 2010 at 9:03 AM

Same problem here : I'm on Windows 7 professional 64 bits, using Visual 2010 and EasyHook_2.6 Source Code.

Yes, including EasyHook32Svc.exe removes that "cannot find the file..." error message.

It's amazing to see that the "FileMon.exe" found in EasyHook_2.6_Binaries, is working fine, and that the source is not compiling without errors !

 

 

Jul 5, 2010 at 3:22 PM
You need more then just EasyHook32Svc.exe . EasyHook.dll EasyHook32.dll EasyHook64.dll EasyHook32Svc.exe EasyHook64Svc.exe Good luck
Jul 19, 2010 at 7:59 PM

I have included everything into the project! I don't get it... Is the services something you need to host yourself in advance of running programs using EasyHook?


----

MY STORY:

I got Windows 7 Ultimate 64bits

I have copied a sample and done nothing different that i can think of...
I get IsAdministrator to return true as a confirmation on me running it as an admin
My error:

Config.Register --- Even with no params array of files to register i get this error...

ERROR DETAILS:

ApplicationException - Unable to run internal command 

Inner Exception Property Data
-> Win32Exception - The system cannot find the file specified

Native Error Code: 2
Error Code: -2147467259

Source: System
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at EasyHook.Config.RunCommand(String InFriendlyName, Boolean InWaitForExit, Boolean InShellExecute, String InPath, String InArguments)
Oct 23, 2012 at 9:32 PM

I have the same problem. 

At first for me it worked, but recently I installed .net framework 4.5 and Visual Studio 2012. These were the only changes I made to my system and now I get the same error in ProcessMonitor Example as a Messagebox.

Please update me also if you find a solution.

Dec 17, 2012 at 6:30 AM

Hi I had same problem - and it is resolved by reading section 2 How to compile, readme.txt in the unzipped package file.

Simply put, referencing to EasyHook.dll is insufficient (though EasyHook.dll, EasyHook.xml, plus easyhook63.dll and easyhook64svc.exe are to be copied to debug folder - my machine is x64). You have to copy over easyhook32.dll and easyhook32svc.exe too to the debug folder.