We have a program (let's call this one catalog) that must run in XP Compatibility mode in Windows 7 (not the VM version). However, another program (Autodesk Voloviewer) that catalog launches tends not to close at all once exited out by the user because it does not like running in XP Compatibility mode. Is there a way to launch a program from VB6 that does not inherit the compatibility mode?
I have the sneaky suspicion that advapi32.dll is going to have to get involved here, but I could be way off base.
Thanks.
Have you tried using
CreateProcess
? See this knowledgebase article: http://support.microsoft.com/kb/129797.You could try setting CREATE_NEW_PROCESS_GROUP in dwCreationFlags.
Or you could try resetting the environment variable __COMPAT_LAYER to empty before creating the new process, like explained here: http://support.microsoft.com/kb/286705
Alternatively, you could pass your own environment settings using
CreateProcess
.