hi,


Friday, May 5, 2006, 8:54:09 PM, you wrote:


> Strange... I wrote a piece of Delphi code to open a file (WinExec). It

> does not do anything with the ions file... Nothing ask me to choose a

> program.


WinExec is deprecated, use ShellExecute instead.


> So, I think, it is an WinXP issue, not a TB!...


yes, this is a WinXP issue. details: ShellExecute does take an action ("verb", in Microsoft's terminology) name as a parameter. it could be "open", "show", "print" and so on (search for ShellExecute on MSDN for details).


if the verb is NULL, the so-called DEFAULT action is invoked.


TheBat!, when opening an attachment, invokes the "open" verb. if this verb isn't defined (ShellExecute returns error), according to MSDN, the program should create one by itself. this is exactly what TB was doing before 24/03/2006.


on 24/03/2006 there was a very detailed debug session with one of our users, which convinced us that something has changed in how the verbs were added by TheBat! to the registry: first, it used the discouraged place of defining them in the system profile and not in the user one. second, the definition format seems to have changed from what was published at http://msdn.microsoft.com/library/default.asp?url="">


unfortunately, Microsoft didn't have any other documentation on this, except for the article mentioned above. basically meaning there are no publicly known APIs to define new verbs, leaving applications to just add data to the registry as described in the article.


i stress again, the article's recipe didn't work.


luckily, the old and ugly way by invoking "RUNDLL32.EXE shell32.dll,OpenAs_RunDLL filename.ext" worked okay, it brings the "open with" dialog, allows the user select the app and writes to the registry whatever is needed despite the correctness or incorrectness of the MSDN article.


for whoever missed the point before this moment, the bottom line is THERE IS NO API THAT WILL EVER BRING THE USER THE SAME "OPEN WITH" DIALOG AS EXPLORER/OpenAs_RunDLL DOES.


if/when this thing ever changes, please let us know. TIA.



-- 

regards,

 vitalie                            mailto:[EMAIL PROTECTED]

________________________________________________________
 Current beta is 3.80.03 | 'Using TBBETA' information:
http://www.silverstones.com/thebat/TBUDLInfo.html
IMPORTANT: To register as a Beta tester, use this link first -
http://www.ritlabs.com/en/partners/testers/

Reply via email to