32-Bit MSHTA.EXE .vs. 64-Bit MSHTA.EXE

Discussion in 'Windows 64bit' started by Mark-Allen Perry, Jun 14, 2005.

  1. Just a small question here to verify what we're seeing.

    Has anyone else noticed that no matter what context you're in on an x64
    machine, only the 32.bit MSHTA.exe executes?

    If you start a 32-bit CMD.exe and execute on the command line; foo.hta, the
    32-bit MSHTA.exe executes. Which is correct.

    If you start a 64-bit CMD.exe and execute on the command line; foo.hta, the
    32-bit MSHTA.exe also executes. Which is a bit unusual.

    Now, since once you're in a 32-bit context, all contact with the 64-bit
    world basically disappears. So, I would think that it might be better to
    execute the 64-bit version if you're in 64-bit context.

    Can anyone explain this? Or maybe point out how a change might be made to
    stay in the same context while executing applications?

    many thanks,

    --
    Mark-Allen Perry
    ALPHA Systems
    Marly, Switzerland
    mark-allen_AT_mvps_DOT_org
    Mark-Allen Perry, Jun 14, 2005
    #1
    1. Advertising

  2. Mark-Allen Perry

    R. B. Guest

    To open hta files with 64-bit version of mshta by default, open a 64-bit
    explorer window, right-click on an .hta file, choose "Open With... ->
    Choose Program", choose Browse, type in
    "%SystemRoot%\System32\mshta.exe" and check the box "Always use selected
    program to open this kind of file", hit OK and you're done.
    R. B., Jun 15, 2005
    #2
    1. Advertising

  3. Mark-Allen Perry

    R. B. Guest

    R. B. wrote:
    > To open hta files with 64-bit version of mshta by default, open a 64-bit
    > explorer window, right-click on an .hta file, choose "Open With... ->
    > Choose Program", choose Browse, type in
    > "%SystemRoot%\System32\mshta.exe" and check the box "Always use selected
    > program to open this kind of file", hit OK and you're done.

    Actually, I wasn't aware of this at the time I wrote it, but this method
    will do exactly what you wanted in your question. That is, in 32-bit
    mode, it will launch the 32-bit mshta.exe, since in 32-bit mode,
    %SystemRoot%\System32 will point to the actual WoW64 system32 directory
    (I just tried it from a 32-bit explorer window). So this will launch
    64-bit or 32-bit depending on what is starting the .hta file.
    R. B., Jun 15, 2005
    #3
  4. Superb! Just what I needed. This works great.

    R.B., many thanks for that.

    have a nice day,

    --
    Mark-Allen Perry
    ALPHA Systems
    Marly, Switzerland
    mark-allen_AT_mvps_DOT_org


    "R. B." <> wrote in message
    news:...
    > R. B. wrote:
    > > To open hta files with 64-bit version of mshta by default, open a 64-bit
    > > explorer window, right-click on an .hta file, choose "Open With... ->
    > > Choose Program", choose Browse, type in
    > > "%SystemRoot%\System32\mshta.exe" and check the box "Always use selected
    > > program to open this kind of file", hit OK and you're done.

    > Actually, I wasn't aware of this at the time I wrote it, but this method
    > will do exactly what you wanted in your question. That is, in 32-bit
    > mode, it will launch the 32-bit mshta.exe, since in 32-bit mode,
    > %SystemRoot%\System32 will point to the actual WoW64 system32 directory
    > (I just tried it from a 32-bit explorer window). So this will launch
    > 64-bit or 32-bit depending on what is starting the .hta file.
    Mark-Allen Perry, Jun 16, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mvccerase

    mshta.exe

    mvccerase, Jan 6, 2004, in forum: Computer Support
    Replies:
    2
    Views:
    1,717
  2. Ulisse
    Replies:
    1
    Views:
    16,685
    Duane Arnold
    May 23, 2004
  3. =?Utf-8?B?Y2FmZWJpcmQ=?=

    connecting to 64 bit cmd.exe or regedit.exe from remote scripts

    =?Utf-8?B?Y2FmZWJpcmQ=?=, May 21, 2005, in forum: Windows 64bit
    Replies:
    2
    Views:
    8,096
    PRIYANSMURARKA
    Nov 2, 2010
  4. canonjon
    Replies:
    2
    Views:
    885
    Mercury
    Sep 10, 2005
  5. =?Utf-8?B?RGVuaXNl?=

    iexplor.exe 32-bit instead of 64-bit

    =?Utf-8?B?RGVuaXNl?=, Jul 5, 2007, in forum: Windows 64bit
    Replies:
    1
    Views:
    389
    Jane C
    Jul 5, 2007
Loading...

Share This Page