jQuery in Action, 3rd edition
The moose likes General Computing and the fly likes Batch File Runner in Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Batch File Runner in Windows" Watch "Batch File Runner in Windows" New topic

Batch File Runner in Windows

Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

Do you know the name of the file that runs batch file in windows?
I need this because recently I got in trouble after creating a new file extension ".BAT" from Windows Explorer's Folder Options->File Types and told that TextPad will run the .BAT extension files. However, now I can't use the double-click approach to run say Tomcat startup.bat file because when I click it, TextPad opens the file so its not run. I have to open cmd now and from there type startup to run tomcat. The .BAT is not shown in the file types list and so at first I couldn't even change it.
To get rid of it. I tried uninstalling TextPad, creating another .BAT extension and tell to run it through WINNT/system32/cmd.exe. CMD.EXE then opens as expected a command wondow but does not run it.
So I think if I can get the name of the batch file runner, I can reassign that filename.exe (if exe at all ) to run .BAT again.
Any help?!?!

Ashik Uzzaman
Senior Software Engineer, TubeMogul, Emeryville, CA, USA.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Wicked problem! Try cmd.exe if you can find it in the Windows directories.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

i have a .bat file to run tomcat. i open a dos window and type "tom" to run it though

Visit my download page
Greg Messer

Joined: May 15, 2003
Posts: 4
You need to use cmd.exe /C to run the batch file then terminate.
I agree. Here's the link: http://aspose.com/file-tools
subject: Batch File Runner in Windows
It's not a secret anymore!