I am working on a Routine to extract the text from a label on a Msgbox from another aplpication. The ultimate goal is to create a web-based interface for registering server scriptlets(through Scrobj.dll) on a server. I've used a variety of API's to shell out to RegSvr32.exe, but I need to retreive the result of any UI-based Error Messages. I can't use a batch file to spool output because I'd need someone sitting at the server to click the 'OK' button. (If I had that, then I might as well tell them to just manually register the scriptlet)

So far I've used EnumWindows to obtain a list of all the window handles, then GetClassName to get the window's class name, then once i find the class (Spy++ tells me that it's called "Static"), I call GetWindowText with the current handle, but it returns nothing.

I've also tried Using SendMessage, supplying the constants WM_GETTEXTLENGTH and WM_GETTTEXT, but they return nothing as well.