Friday, May 15, 2009

Fix your broken application: The Black Art of shims

I wasnt sure what this talk would be about before getting here, as it about, Moving apps to operating systems and using thier compatibility toolkit to get applications to work , without changing windows. Intercept API call before it gets to its destination. Or can find it address in memory and redirect it to new code. Use standard analyzer to make changes you need. Running your app with this open will list and categorize bugs/errors. Use the mitigation menu item to fix problems. Use Compatibility Administrator to see the fixes that Standard Analyzer made(shims). If it applies them to system dlls , remove from shims to apply to all calls. If calling an exe, don’t use patch, update, install, or setup in app name or Windows7/Vista will try to run as elevated user. These program come with Application compatibility toolkit. Shims are applied when process is started. Using VirtualRegistry, use addredirct command to exe command to point to different registry items. There is another similar command to redirect file paths. When trying to put in system32, it will create a tmp file and let your app point to temp file. You can get it to think it on a different operating system, and has ability to temp turn off operating system specific program temporarily while program is running. SDBINST is the program to install compatibility database on machine. StandUser Analyzer has menu to create an msi to install the compatibility database to people machines. First time app runs, looks at compatibility database, then store in cache, should never call database again. DebugView to see what shim are being run when a application starts. You can get your app to ignore specific msgboxs or even exceptions. .

No comments:

Post a Comment