I have a program in .Net 4.5 using ICorDebug::CreateProcess (http://msdn.microsoft.com/en-us/library/vstudio/ms232508.aspx). It work on Windows XP, Vista, 7, but not on Windows 8 : my program stop without any message, even in debug mode. But, the same program, in .Net 4.0, work correctly on Windows 8.
Any idea about this?
Thank in advance 🙂
I am not sure if this will be helpful in diagnosing this problem or not, but I have something similar happening on Windows 8 as well.
We have some legacy VB6 apps that we are trying to test on Win 8.
Several of the apps run other VB6 apps using CreateProcessA. Some with and some without parameters – usually the command line parm points to a parameter file created in %temp%.
Most of these run just fine. However, a few of them will not run at all. CreateProcessA returns a Zero.
But if I check the err.LastDLLError in VB, it returns a 740 which means “process requires elevation”.
If I use ShellExecute, it works fine – and UAC does not ask for elevation!
I can’t tell why these few programs behave like this, because, as I mentioned, other programs that I feel are just as complex will run just fine with CreateProcessA.
BTW – These programs run perfectly under XP, Vista and Win 7 with UAC on or off. And no elevation is required on any of them.
But – bottom line is ShellExecute seems to run ok, so I would recommend to the poster to try it instead of CreateProcess.