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.
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.
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.
[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.
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”.