5ilverFox
5ilverFox

Reputation: 51

Working application launched from C# fails

I have C# application acting as a scheduler. It runs various applications successfully. One of these applications (VB6) fails halfway through the job. If I execute this VB6 application directly with the exact same parameters, it completes successfully. The scheduler runs other VB6 applications successfully. Does anybody know what could cause this? What in the environment changes when you launch an application (VB6 exe) from within another application (C#)? Maybe there is an expert that can point me to something to help solve this?

I am adding more logging to the VB6 application and currently the error points to a routine executing SQL commands, but I have other applications executing the same code with no problem. At this stage I am stumped.

Upvotes: 0

Views: 61

Answers (2)

5ilverFox
5ilverFox

Reputation: 51

OK, I found the problem. I started by rolling back the VB6 code two versions and proved that it worked. I then added small pieces of the new code and checking every time if it still works. I did not add back all the code (some were just cosmetic) and it is now working with the new functionality. It has taken a LOT of hours and it will take a lot more to determine what caused the original error, so I decided to take the win, because I cannot afford more hours.

Upvotes: 0

Thomas Weller
Thomas Weller

Reputation: 59575

The following might be different

  • user account / user rights
  • working directory
  • environment variables

I suggest inspecting the VB6 application with Process Explorer and comparing against a working version.

Upvotes: 2

Related Questions