Windows 10: bat files not being run when double clicked in TC

English support forum

Moderators: white, Hacker, petermad, Stefan2

jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Windows 10: bat files not being run when double clicked in TC

Post by *jmwap »

Hi,

somethings has been changed in my system, running TC 9.21a 32b on win10 64b pro (Microsoft Windows [Version 10.0.17763.134]), and now I have issues with bat files:

When I double click on them, I get a cmd, empty that shows up for a couple of seconds, and then closes. The .bat is NOT run. If I try to do the same in Explorer, the bat runs.

If I open a cmd can cd to the dir containing the .bat, and I type the first letters of the .bat, TAB does not complete the file name, it does complete filenames of exe files.

If I run the .bat from the cmd I, it DOES run fine

I have checked "assoc .bat" and "ftype batfile" and both return expected values.
Any insight would be super useful...
User avatar
SSc
Junior Member
Junior Member
Posts: 67
Joined: 2015-10-27, 10:12 UTC
Location: Karlsruhe

Re: Windows 10: bat files not being run when double clicked in TC

Post by *SSc »

Just to get a better understanding:
  • does it make a difference when you start if from the 64bit version of TC?
and/or
  • have you tried to change the extension from .bat to .cmd (I remember vaguely that different command processors may be used for bat resp. cmd). But maybe this was only true for older windows versions)
and/or
  • any difference when running TC as admin or not?

Maybe this gives further hints on where to investigate further...
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Re: Windows 10: bat files not being run when double clicked in TC

Post by *jmwap »

  • does it make a difference when you start if from the 64bit version of TC?
I never use 64 bits, just tried...and IT WORKS!!
  • have you tried to change the extension from .bat to .cmd (I remember vaguely that different command processors may be used for bat resp. cmd). But maybe this was only true for older windows versions)
tried, not difference
  • any difference when running TC as admin or not?
tried, no difference

Not sure if this was clear, this suddenly started happening a week or so ago. I have been running TC happily for a long time without issues.

thanks!!
User avatar
SSc
Junior Member
Junior Member
Posts: 67
Joined: 2015-10-27, 10:12 UTC
Location: Karlsruhe

Re: Windows 10: bat files not being run when double clicked in TC

Post by *SSc »

Not sure if this was clear, this suddenly started happening a week or so ago. I have been running TC happily for a long time without issues.
Yes, that was understood by me.
I never use 64 bits, just tried...and IT WORKS!!
Ok, then there is a least a similarity, since also explorer and command shell are 64-bit apps.

And we can further narrow down the problem:
  • is it only a problem of TC 32-bit?
or
  • is it a general problem in the context of 32-bit apps (for instance, you could doublecheck it with a 32-bit test version of one of the other "Commanders" on the market)
For both scenarios I have no explanation yet. But it would be interesting to know it if only happens with TC 32-bit or also other 32-bit apps
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Windows 10: bat files not being run when double clicked in TC

Post by *Stefan2 »

... you could doublecheck it with a 32-bit test version ...
Just FYI


32-bit commandline interpreter: C:\Windows\SysWOW64\cmd.exe

Spoiler
C:\Windows\SysWOW64\cmd.exe
------------------------------------------------
C:\Windows\SysWOW64>set prog
ProgramFiles=C:\Program Files (x86)
ProgramFiles(x86)=C:\Program Files (x86)
------------------------------------------------


C:\Windows\System32\cmd.exe
------------------------------------------------
C:\Users\UsErNaMe>set prog
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
------------------------------------------------
User avatar
SSc
Junior Member
Junior Member
Posts: 67
Joined: 2015-10-27, 10:12 UTC
Location: Karlsruhe

Re: Windows 10: bat files not being run when double clicked in TC

Post by *SSc »

Or there is an easier way: you can explicitely open a 32-bit commandshell by doing this:
press Win + R key to open Run dialog, and type %windir%\SysWoW64\cmd.exe . Press Enter.

In this 32-bit command shell execute your .bat now. Does it work?
User avatar
SSc
Junior Member
Junior Member
Posts: 67
Joined: 2015-10-27, 10:12 UTC
Location: Karlsruhe

Re: Windows 10: bat files not being run when double clicked in TC

Post by *SSc »

Ah, we had the same idea :-)
User avatar
petermad
Power Member
Power Member
Posts: 14806
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Windows 10: bat files not being run when double clicked in TC

Post by *petermad »

2jmwap
I have no such problems when double-clicking on a .bat file running TC 9.21a 32bit on Windows 10 Home version 1803 build 17134.407

Is your version 10.0.17763.134 the 1809 update? - maybe that is the problem?
Last edited by petermad on 2018-11-28, 21:18 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6487
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Windows 10: bat files not being run when double clicked in TC

Post by *Horst.Epp »

petermad wrote: 2018-11-28, 17:49 UTC 2jmwap
I have no such problems when double-clicking on a .bat file in running TC 9.21a 32bit on Windows 10 Home version 1803 build 17134.407

Is your version 10.0.17763.134 the 1809 update? - maybe that is the problem?
There is no such problem with Windows version 1809 OS Build 17763.134
I can run bat files without problems double clicking using TC 9.21a x86 and x64
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Re: Windows 10: bat files not being run when double clicked in TC

Post by *jmwap »

SSc wrote: 2018-11-28, 14:20 UTC Or there is an easier way: you can explicitely open a 32-bit commandshell by doing this:
press Win + R key to open Run dialog, and type %windir%\SysWoW64\cmd.exe . Press Enter.

In this 32-bit command shell execute your .bat now. Does it work?
When I run this, the console windows stays for a second, then goes away, just like when I double click on the .bat...
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Windows 10: bat files not being run when double clicked in TC

Post by *Stefan2 »

jmwap wrote: 2018-11-28, 18:47 UTC...

When I run this, the console windows stays for a second, then goes away, just like when I double click on the .bat...

Can you post your batch here?




 
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Re: Windows 10: bat files not being run when double clicked in TC

Post by *jmwap »

the contents of the batch are not relevant, this one has the same issue:

one.bat:

Pause
echo "hi"
pause
jmwap
Member
Member
Posts: 121
Joined: 2008-03-23, 12:40 UTC

Re: Windows 10: bat files not being run when double clicked in TC

Post by *jmwap »

Stefan2 wrote: 2018-11-28, 18:58 UTC
jmwap wrote: 2018-11-28, 18:47 UTC...

When I run this, the console windows stays for a second, then goes away, just like when I double click on the .bat...

Can you post your batch here?




 
but maybe i wasn't clear...when I run this: Win + R key to open Run dialog, and type %windir%\SysWoW64\cmd.exe . Press Enter.
I do not get a cmd either, a windows shows off for a second, then goes away.
User avatar
Dalai
Power Member
Power Member
Posts: 9388
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Windows 10: bat files not being run when double clicked in TC

Post by *Dalai »

Please do the following: Win+R, enter "cmd.exe", ENTER. In the open CMD window type "%SystemRoot%\SysWOW64\cmd.exe" (without the quotes), ENTER. Please post the full CMD window output here.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Windows 10: bat files not being run when double clicked in TC

Post by *ghisler(Author) »

Apparently cmd.exe is missing in windows\SysWOW64\cmd.exe. Try copying it there from windows\Sysnative\cmd.exe
Author of Total Commander
https://www.ghisler.com
Post Reply