Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 12 APR 2024 02:28:36AM Barry Stevens wrote:

How can I get the name of the windows default app for a given file extension?

I do believe it is in the registry, but, not sure how to format the command that I need.


At 12 APR 2024 04:13AM Carl Pates wrote:

Try the SYSTEM FINDEXE method

Carl Pates


At 12 APR 2024 04:36PM Barry Stevens wrote:

Try the SYSTEM FINDEXE method

Carl Pates

Brilliant - this works in OI10, is there a similar function in OI9


At 12 APR 2024 05:02PM Carl Pates wrote:

The docs for that method mention the WIndows API function that it wraps, so you coudl use the latter in v9.

Carl Pates


At 12 APR 2024 05:09PM Barry Stevens wrote:

The docs for that method mention the WIndows API function that it wraps, so you coudl use the latter in v9.

Carl Pates

Yep, saw that, now working on it.

appears has not been declared.

I see it in "DLL_WINAPI_SHELL32" with a lot of others that I know are currently used, so, will do run DECLARE_FCNS "DLL_WINAPI_SHELL32" and hope I dont break anything!!


At 12 APR 2024 05:56PM Barry Stevens wrote:

The docs for that method mention the WIndows API function that it wraps, so you coudl use the latter in v9.

Carl Pates

Yep, saw that, now working on it.

appears has not been declared.

I see it in "DLL_WINAPI_SHELL32" with a lot of others that I know are currently used, so, will do run DECLARE_FCNS "DLL_WINAPI_SHELL32" and hope I dont break anything!!

Git it working now in OI9, thanks.

#ifndef REVENG64

   // Compiled in v9

  declare function ShellExecuteA

  declare subroutine winapi_FindExecutableW

  execname   = str(' ',255)

  xFile      =file[-1,"B\"]:\00\

  xdirectory =file[1,col1()]:\00\

  WinApi_FindExecutableW(xfile,xdirectory,execname)

 

   if indexc(ExecName[-1,"B\"],'mspaint',1) then

      xVerb ='edit'

   end

   return ShellExecuteA( hwnd, xVerb, file, parameters, directory, nShow )   

#endif

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/43d48c4f70190b4f88c47f3861310447.txt
  • Last modified: 2025/05/29 20:25
  • by 127.0.0.1