Jump to content

Detecting 16-bit application launch?


Recommended Posts

Everyone knows that 16-bit programs won't run in 64-bit OSes...

Is there a way to detect when someone tries to launch one of these on 64-bit OSes? I'm trying to make a small program that can run constantly, detect when a 16-bit program is being run, get the full path and filename of the program that can't launch, and save it to an INI for another program to read.

I've tried detecting the "incompatible program" message that Windows spits out using things like WinWait, but the title bar is the full path and filename (not very useful for detecting when the message appears since it changes per-file), and the text in the message box seems invisible to autoit (the window info tool only sees the OK button). For reference, it's this dialog.

Does anyone know of a way to handle this?

Link to comment
Share on other sites

  • Moderators

I don't have any apps right in front of me to test with, but doesn't it also throw something in the event viewer? You could potentially watch that for entries.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I don't have any apps right in front of me to test with, but doesn't it also throw something in the event viewer? You could potentially watch that for entries.

 

It does throw an entry in the event logs. Never knew that until now. Application Log gets an entry from Wow64 Emulation Layer, event ID 1109. I'll take a look at that and see if I can get something to work.

Link to comment
Share on other sites

  • Moderators

There is a good example in the help file under _EventLog_Read that may point you in the right direction.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...