Discussion:
Running Microsoft Edge from script
(too old to reply)
Dave "Crash" Dummy
2017-08-30 11:33:01 UTC
Permalink
I can run Internet Explorer from VBScript using the InternetExplorer object:

Set IE = CreateObject("InternetExplorer.Application")

Can I do the same thing with Microsoft Edge? How?
--
Crash

Genius is the ability to see the obvious.
Mayayana
2017-08-30 12:39:00 UTC
Permalink
"Dave "Crash" Dummy" <***@invalid.invalid> wrote

| Set IE = CreateObject("InternetExplorer.Application")
|
| Can I do the same thing with Microsoft Edge? How?
|

Did you check the Registry for an application object
ProgID? I doubt it exists. Edge *is* IE. I don't know the
technical details. I suspect there's probably an edge.exe
along with iexplore.exe, but that they're both wrappers
around the same basic libraries like mshtml.dll, shdocvw.dll,
etc.

The difference is that Edge has most IE-specific
functionality removed. There's no option for compatibility
mode, VBScript, ActiveX, or any other IE-specific
fiunctionality. So even if there were an application
object it would be of little use. MS have tried to make
Edge a standards-consistent browser. And since IE is
still there for the sake of corporate customers who
use things like HTAs, there's really no reason to have a
redundant-but-crippled Edge object.
Dave "Crash" Dummy
2017-08-30 16:16:39 UTC
Permalink
| Set IE = CreateObject("InternetExplorer.Application") | | Can I do
the same thing with Microsoft Edge? How? |
Did you check the Registry for an application object ProgID? I doubt
it exists. Edge *is* IE. I don't know the technical details. I
suspect there's probably an edge.exe along with iexplore.exe, but
that they're both wrappers around the same basic libraries like
mshtml.dll, shdocvw.dll, etc.
The difference is that Edge has most IE-specific functionality
removed. There's no option for compatibility mode, VBScript, ActiveX,
or any other IE-specific fiunctionality. So even if there were an
application object it would be of little use. MS have tried to make
Edge a standards-consistent browser. And since IE is still there for
the sake of corporate customers who use things like HTAs, there's
really no reason to have a redundant-but-crippled Edge object.
Thank you. I still use IE exclusively for browsing and HTA's extensively
locally. I was just wondering what I may be missing. Apparently, nothing.

There is an edge executable file buried deep within the system, but it
is outside the default system path. I haven't tried executing it either
from a script or the keyboard:

C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe
--
Crash

"The future ain't what it used to be."
~ Yogi Berra ~
JJ
2017-08-31 16:33:12 UTC
Permalink
Post by Mayayana
Did you check the Registry for an application object
ProgID? I doubt it exists. Edge *is* IE. I don't know the
technical details. I suspect there's probably an edge.exe
along with iexplore.exe, but that they're both wrappers
around the same basic libraries like mshtml.dll, shdocvw.dll,
etc.
To clarify, Edge is not IE. Edge is an entirely separate web browser from
IE. It uses EdgeHTML engine rather than Trident (which is used by IE). I
actually checked this using Process Explorer. It shows that Edge doesn't
load any of IE's DLLs such as MSHTML.DLL or SHDOCVW.DLL when it shows a HTML
document.

Surprisingly, EdgeHTML's EMODEL.DLL has COM librar(ies), and one of its DLL
has interfaces which are identical (and extended) to Trident's. You can
compare this with IE's SHDOCVW.DLL/IEFRAME.DLL.

Windows 10 defaults to Trident's engine rather than EdgeHTML. i.e. the
registry data points to IE's DLL instead of Edge's. A program may choose to
use EdgeHTML instead of Trident if it wants to show HTML contents.

It's true that despite all these, it doesn't tell that the COM libraries in
Edge's DLL actually use EdgeHTML instead of Trident. But if it's just a
wrapper for Trident, why does it exists in the first place?
Post by Mayayana
The difference is that Edge has most IE-specific
functionality removed. There's no option for compatibility
mode, VBScript, ActiveX, or any other IE-specific
fiunctionality. So even if there were an application
object it would be of little use. MS have tried to make
Edge a standards-consistent browser. And since IE is
still there for the sake of corporate customers who
use things like HTAs, there's really no reason to have a
redundant-but-crippled Edge object.
IMO, the fact that Microsoft decided to make Edge to have COM interface
which is identical to Trident, means that they're planning on replacing
Trident with Edge entirely. Even though it'd mean that there would be no
more VBScript and ActiveX support.

HTML Application (HTA) may still be supported, though (without VBScript and
ActiveX, of course). Since it's just a bundle of files which is run using
special mode of web browser. Even if Microsoft doesn't provide the special
mode to run HTA files (which is equivalent to IE's MSHTA.EXE), it's still
possible to create one by using the COM libraries from Edge's DLLs.
Dave "Crash" Dummy
2017-08-31 18:00:22 UTC
Permalink
Post by JJ
HTML Application (HTA) may still be supported, though (without VBScript and
ActiveX, of course). Since it's just a bundle of files which is run using
special mode of web browser. Even if Microsoft doesn't provide the special
mode to run HTA files (which is equivalent to IE's MSHTA.EXE), it's still
possible to create one by using the COM libraries from Edge's DLLs.
HTA without VBScript would be pretty useless.
--
Crash

English is not my native tongue; I'm an American.
JJ
2017-09-01 12:12:52 UTC
Permalink
Post by Dave "Crash" Dummy
Post by JJ
HTML Application (HTA) may still be supported, though (without VBScript and
ActiveX, of course). Since it's just a bundle of files which is run using
special mode of web browser. Even if Microsoft doesn't provide the special
mode to run HTA files (which is equivalent to IE's MSHTA.EXE), it's still
possible to create one by using the COM libraries from Edge's DLLs.
HTA without VBScript would be pretty useless.
More like useless without ActiveX, not VBScript. Cause AFAIK, it'd still be
usable using JScript or even JavaScript, assuming that ActiveX is still
exposed to HTA.
Mayayana
2017-08-31 22:10:55 UTC
Permalink
"JJ" <***@vfemail.net> wrote

| To clarify, Edge is not IE. Edge is an entirely separate web browser from
| IE. It uses EdgeHTML engine rather than Trident (which is used by IE). I
| actually checked this using Process Explorer. It shows that Edge doesn't
| load any of IE's DLLs such as MSHTML.DLL or SHDOCVW.DLL when it shows a
HTML
| document.
|

Interesting to know, though they did say that it was
based on Trident with the IE-specific things stripped
out. It's possible that they've just duplicated the libraries
for the fork.
Which brings up the question of how the basic IE
libraries like urlmon.dll get used.


| IMO, the fact that Microsoft decided to make Edge to have COM interface
| which is identical to Trident, means that they're planning on replacing
| Trident with Edge entirely. Even though it'd mean that there would be no
| more VBScript and ActiveX support.
|
My understanding is that they've already replaced
IE. That seems clear. But it needs to be kept around
for coprorate customers who are heavily invested in
HTAs, ActiveX, etc.

| HTML Application (HTA) may still be supported, though (without VBScript
and
| ActiveX, of course). Since it's just a bundle of files which is run using
| special mode of web browser. Even if Microsoft doesn't provide the special
| mode to run HTA files (which is equivalent to IE's MSHTA.EXE), it's still
| possible to create one by using the COM libraries from Edge's DLLs.

But the whole point of an HTA is no security. What
sense would it make to have an HTA with no VBS,
no ActiveX and normal security. That's not an HTA.
It's merely a local webpage.
Mayayana
2017-09-01 02:39:20 UTC
Permalink
There's an explanation here, as least partly:

https://www.smashingmagazine.com/2015/01/inside-microsofts-new-rendering-engine-project-spartan/

They forked IE, then stripped the risky functionality
and anything that wasn't standards-compliant. Then
they started adding in newer functionality. All in a
sandboxed security framework.
Of course, that's the official story. It doesn't explain
why so many people seem to dislike Edge and why it's
sunk almost out of sight in terms of usage.

But I think this article explains the basic strategy:
Create a safe browser that can compete on standards
compliance while also leaving IE in place for corporate
use.
JJ
2017-09-01 12:06:07 UTC
Permalink
Post by Mayayana
| HTML Application (HTA) may still be supported, though (without VBScript
and
| ActiveX, of course). Since it's just a bundle of files which is run using
| special mode of web browser. Even if Microsoft doesn't provide the special
| mode to run HTA files (which is equivalent to IE's MSHTA.EXE), it's still
| possible to create one by using the COM libraries from Edge's DLLs.
But the whole point of an HTA is no security. What
sense would it make to have an HTA with no VBS,
no ActiveX and normal security. That's not an HTA.
It's merely a local webpage.
EdgeHTML as it is now is similar like WebKit, and Chakra is similar to V8.
V8 and WebKit are widely used for web application development frameworks.
IOTW, HTA may no longer be a web based application for systems. But rather
normal application.

But let's not forget the special mode to run the HTA files, here. That mode
may actually expose VBScript and ActiveX, in order to keep compatibility.

What people are most complains about is the ActiveX in the web browser. They
don't complain about (or don't even aware of) ActiveX in HTA. HTA may infact
be unaffected by Edge.
Mayayana
2017-09-01 13:10:37 UTC
Permalink
This post might be inappropriate. Click to display it.
Thomas Boomer
2021-03-31 15:27:21 UTC
Permalink
Post by Mayayana
| EdgeHTML as it is now is similar like WebKit, and Chakra is similar to V8.
| V8 and WebKit are widely used for web application development frameworks.
| IOTW, HTA may no longer be a web based application for systems. But rather
| normal application.
|
HTA never was web-based. One of the few requirements
is that it must be running locally. "Web applications" are a
different animal -- essentially highly interactive webpages
built almost entirely of javascript. Really not webpages at all.
Those only use what people like to pretend is safe scripting.
They are designed to be powerful in terms of visitor tracking,
interactivity and back-end connection. HTAs are a UI for
Windows programming. The only commonality is the heavy use
of scripting in an HTML-rendering window.
| But let's not forget the special mode to run the HTA files, here. That
mode
| may actually expose VBScript and ActiveX, in order to keep compatibility.
| What people are most complains about is the ActiveX in the web browser.
They
| don't complain about (or don't even aware of) ActiveX in HTA. HTA may
infact
| be unaffected by Edge.
Yes. They stripped down IE and rebuilt it to make
Edge as a "normal" web browser. It no longer has
access to VBS, ActiveX, BHOs, or any of the Explorer
tie-in. That's radical. In a sense it's a return to the
pre-Active Desktop IE.
I don't know how many people are aware of the
an Explorer Bar shell extension. (The panel on the left in
folder windows.) It can't be separated from IE. One
can only filter IE-related messages. Or conversely, if
writing the Bar for IE one gets the tie-in to folder
windows. And the listview object in a folder window
is still an InternetExplorer object.
I've also written a mime filter. With just a couple of
Registry entries one gets complete control over IE
webpages *before* IE gets them.
Then there are common functions like URLDownloadToFile.
Many programmers use that to download files, but it's
actually an IE wrapper.
IE is part of the Windows API in many ways. MS did
that deliberately to 1) beat out Netscape and 2) make
a case in court that they couldn't separate IE from
Windows. They didn't just make a browser to compete
with Netscape. They molded an OS to compete with
Netscape. Adding ActiveX and COM scripting worked out
so well that they kept going. That single addition of
CreateObject (or ActiveXObject) made all the difference.
When security became a concern they came up with
HTAs so that IE itself could be made more secure. In a
sense, the HTA invention was the first fork, but only
a partial one. Shdocvw.dll was wrapped by mshta.exe for
HTAs and by iexplore.exe for IE.
Edge is a sandboxed version meant to compete with
other browsers and be standards-compatible. It makes
sense. They can't make a safe browser without separating
it from Windows. But of course there is the question
of whether it's sufficiently separated from Windows.
Either way, it's sterile for scripting purposes.
Which means the future of HTAs has nothing to do
with Edge, one way or the other. It just depends on
whether MS feels they need to keep supporting
corporate scripting, which means keeping IE around.
Even now, IE11 can use compatibility mode to bring
back normal IE functionality like VBS. Edge can't. It
doesn't have that functionality at all. The Edge
userAgent is actually spoofed to mention Chrome,
Safari and Gecko, while removing "MSIE". They want
webpage designers to treat it like the other major
browsers.
I think what they did makes a lot of sense. IE can
now be the scripting UI for Windows software. The
only problem is that they still insist on trying to use
their browser for customer lock-in. They're still being
sleazy. Edge is still tied to Windows and it's being
designed for "consumer" use, with emphasis on things
like push notifications AKA ad subscriptions.
A new, sleazy browser that can only work on 25% of
Windows computers and can't run at all on Mac or
Linux is not a browser. It's a crippled specialty program.
A Win10 "phone app". On my own site I check for
IE11 and Edge. For visitors using IE11 I show a message
saying they need to enable compat mode. For visitors
using Edge I show a message that they'll need to use
*any* other browser. It's bad enough that I need special
webpages just for IE. I'm not about to buy Win10 and
start testing a 3rd set of pages for a new browser
used by just a few people. It's unfortunate that MS don't
just make a real browser. They're so good at making
software. It's only the sleaze factor that messes it up.
I don't doubt that if they went about it with honesty
and decency, just trying to make a good browser to
serve the customer as well as possible, they could make
the best and most innovative browser, and that they
could do it without any sneaky leveraging of Windows.
Yeah they do in fact support VBScript in Edge Chromium.
R.Wieser
2021-03-31 15:43:49 UTC
Permalink
Thomas,
Post by Thomas Boomer
Yeah they do in fact support VBScript in Edge Chromium.
How old is Edge Chromium ? And how old is the post you responded to ?

Do I need to say more ?

Regards,
Rudy Wieser
Post by Thomas Boomer
Post by Mayayana
| EdgeHTML as it is now is similar like WebKit, and Chakra is similar to V8.
| V8 and WebKit are widely used for web application development frameworks.
| IOTW, HTA may no longer be a web based application for systems. But rather
| normal application.
|
HTA never was web-based. One of the few requirements
is that it must be running locally. "Web applications" are a
different animal -- essentially highly interactive webpages
built almost entirely of javascript. Really not webpages at all.
Those only use what people like to pretend is safe scripting.
They are designed to be powerful in terms of visitor tracking,
interactivity and back-end connection. HTAs are a UI for
Windows programming. The only commonality is the heavy use
of scripting in an HTML-rendering window.
| But let's not forget the special mode to run the HTA files, here. That
mode
| may actually expose VBScript and ActiveX, in order to keep
compatibility.
| What people are most complains about is the ActiveX in the web browser.
They
| don't complain about (or don't even aware of) ActiveX in HTA. HTA may
infact
| be unaffected by Edge.
Yes. They stripped down IE and rebuilt it to make
Edge as a "normal" web browser. It no longer has
access to VBS, ActiveX, BHOs, or any of the Explorer
tie-in. That's radical. In a sense it's a return to the
pre-Active Desktop IE.
I don't know how many people are aware of the
an Explorer Bar shell extension. (The panel on the left in
folder windows.) It can't be separated from IE. One
can only filter IE-related messages. Or conversely, if
writing the Bar for IE one gets the tie-in to folder
windows. And the listview object in a folder window
is still an InternetExplorer object.
I've also written a mime filter. With just a couple of
Registry entries one gets complete control over IE
webpages *before* IE gets them.
Then there are common functions like URLDownloadToFile.
Many programmers use that to download files, but it's
actually an IE wrapper.
IE is part of the Windows API in many ways. MS did
that deliberately to 1) beat out Netscape and 2) make
a case in court that they couldn't separate IE from
Windows. They didn't just make a browser to compete
with Netscape. They molded an OS to compete with
Netscape. Adding ActiveX and COM scripting worked out
so well that they kept going. That single addition of
CreateObject (or ActiveXObject) made all the difference.
When security became a concern they came up with
HTAs so that IE itself could be made more secure. In a
sense, the HTA invention was the first fork, but only
a partial one. Shdocvw.dll was wrapped by mshta.exe for
HTAs and by iexplore.exe for IE.
Edge is a sandboxed version meant to compete with
other browsers and be standards-compatible. It makes
sense. They can't make a safe browser without separating
it from Windows. But of course there is the question
of whether it's sufficiently separated from Windows.
Either way, it's sterile for scripting purposes.
Which means the future of HTAs has nothing to do
with Edge, one way or the other. It just depends on
whether MS feels they need to keep supporting
corporate scripting, which means keeping IE around.
Even now, IE11 can use compatibility mode to bring
back normal IE functionality like VBS. Edge can't. It
doesn't have that functionality at all. The Edge
userAgent is actually spoofed to mention Chrome,
Safari and Gecko, while removing "MSIE". They want
webpage designers to treat it like the other major
browsers.
I think what they did makes a lot of sense. IE can
now be the scripting UI for Windows software. The
only problem is that they still insist on trying to use
their browser for customer lock-in. They're still being
sleazy. Edge is still tied to Windows and it's being
designed for "consumer" use, with emphasis on things
like push notifications AKA ad subscriptions.
A new, sleazy browser that can only work on 25% of
Windows computers and can't run at all on Mac or
Linux is not a browser. It's a crippled specialty program.
A Win10 "phone app". On my own site I check for
IE11 and Edge. For visitors using IE11 I show a message
saying they need to enable compat mode. For visitors
using Edge I show a message that they'll need to use
*any* other browser. It's bad enough that I need special
webpages just for IE. I'm not about to buy Win10 and
start testing a 3rd set of pages for a new browser
used by just a few people. It's unfortunate that MS don't
just make a real browser. They're so good at making
software. It's only the sleaze factor that messes it up.
I don't doubt that if they went about it with honesty
and decency, just trying to make a good browser to
serve the customer as well as possible, they could make
the best and most innovative browser, and that they
could do it without any sneaky leveraging of Windows.
Yeah they do in fact support VBScript in Edge Chromium.
JJ
2021-03-31 17:14:08 UTC
Permalink
Post by Thomas Boomer
Yeah they do in fact support VBScript in Edge Chromium.
No it's not. Edge (labelled) Chromium do not and will never support VBScript
natively. Edge (labelled) Chromium is not MSIE and does not use MSIE engine.
Loading...