This is not a joke.

Create a Windows application with Xojo running on Windows
The application can be a consolle, desktop or web without user code.
Now starts the application on Window 7.

If the executale filename contains “instal” you get an application that when terminates produces a fault only when started from Explorer.exe and no faults when started from cmd.exe or another console application.

Can someone explain this strange behaviour?
Thank you in advance for anyone willing to try this incredible (for me) problem.

Best regards.

Great, it seems not a Xojo problem but a Windows problems.
This happens also with any other “exe” file.
What a strange world…

Have you tried running it as Administrator? Windows has a set of keywords that indicate its possibly a setup program. When a setup program is detected it requires Admin rights.

As Administrator = same result.
Maybe someone at MS was joking…

I believe this shouldn’t happen if the App Manifest is correct. Which version of Xojo are you using?

Hi Michael, this happens with ANY executable: it doesn’t matter if built with Xojo or whatever.
This does not happens in Windows XP.

Try for yourself: simply rename an executable with a name containing these 6 chars “instal”.
When the program terminates the fault happens if the program was started from Explorer.exe but not, for example, from cmd.exe.

This is VERY strange…

[quote=55754:@Maurizio Rossi]Hi Michael, this happens with ANY executable: it doesn’t matter if built with Xojo or whatever.
This does not happens in Windows XP.

Try for yourself: simply rename an executable with a name containing these 6 chars “instal”.
When the program terminates the fault happens if the program was started from Explorer.exe but not, for example, from cmd.exe.

This is VERY strange…[/quote]

Normal windows behaviour.

“programmer’s misbehaviour” sounds better for me

[quote=55754:@Maurizio Rossi]Hi Michael, this happens with ANY executable: it doesn’t matter if built with Xojo or whatever.
[/quote]

Not true. In fact, my app (built with REALbasic 2010) does not do this. The reason is because I have the manifest set properly.

You need to set the manifest to properly include the Compatibility tags, as described here:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd371711(v=vs.85).aspx

Without those tags, PCA will be invoked on Vista, 7 and higher, as described here:

http://windows.microsoft.com/en-us/windows/program-compatibility-assistant-faq

To explain what’s going on here: If an App has the word “Install” in its name, and it does not have the Compatibility tags in the App Manifest, then Windows Vista (7, 8, and later) make an assumption: they assume that the “Instal” name means “This app is an installer”. After running, the OS takes a look to see if anything was actually installed (I believe it looks for registry key changes, but I’m not sure about this). If it sees nothing, then it decides “This is an old XP-based program that didn’t work properly under Vista. Therefore I’ll let the user run it again, but this time the OS will do a bunch of changes to trick the app into thinking that it’s running under XP”.

If you include the app manifest compatibility tags, then this tells the OS “Hey, this EXE knows about Vista, and 7, don’t give me that kind of help”.

Thank you Michael.
Too simple some sort of bug, there must be a technical reason.

Best regards.