From: Tony Toews [MVP] on
Folks

I''m looking at cleaning up some logic dealing with starting up an exe
via Shell. I'm wondering what other file extensions are considered to
be executable?

Obviously exe. What about com, bat, cmd and possibly vbs? That said
who creates coms these days? Also I think pif and scr but those I
will ignore as they aren't relevant to me and are more virus file
extensions these days.

There are so many hits on Shell at MSDN i don't know where to start.

Thanks, Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
From: Jeff Johnson on
"Tony Toews [MVP]" <ttoews(a)telusplanet.net> wrote in message
news:2ises5p97elg3qibp5d1hfnagdjl5f0ums(a)4ax.com...

> I''m looking at cleaning up some logic dealing with starting up an exe
> via Shell. I'm wondering what other file extensions are considered to
> be executable?
>
> Obviously exe. What about com, bat, cmd and possibly vbs? That said
> who creates coms these days? Also I think pif and scr but those I
> will ignore as they aren't relevant to me and are more virus file
> extensions these days.
>
> There are so many hits on Shell at MSDN i don't know where to start.

Well, if you're going to consider .vbs then consider .js as well. There's
also something called a "shell scrap" with extension .shs.


From: Karl E. Peterson on
Tony Toews [MVP] wrote:
> I''m looking at cleaning up some logic dealing with starting up an exe
> via Shell. I'm wondering what other file extensions are considered to
> be executable?

It varies from machine to machine, of course...

C:\>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

See also: http://vb.mvps.org/samples/Which/

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Karl E. Peterson on
Tony Toews [MVP] wrote:
> I''m looking at cleaning up some logic dealing with starting up an exe
> via Shell. I'm wondering what other file extensions are considered to
> be executable?

This is actually the logic I used in that Which sample:

' Find order of executable file extensions.
pathext = Environ("PATHEXT")
If Len(pathext) = 0 Then
' Undefined? Up to us!
pathext = ".COM;.EXE;.BAT;.CMD"
End If

Before the PATHEXT e-var was introduced, the 4-element default I
provided was pretty much the defacto (if not hardcoded) standard, I
believe.

Note this string also provides the priority order for execution, if two
files with the same base name exist at the same point in the search
path.

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Karl E. Peterson on
Jeff Johnson wrote:
> also something called a "shell scrap" with extension .shs.

Are those actually executables, or just datafiles that load into some
other executable?

I'm almost totally ignorant of those critters, obviously. Looking in
my (Win7) registry, that extension isn't even listed, either. Huh.

--
..NET: It's About Trust!
http://vfred.mvps.org