Sign in with
Sign up | Sign in
Your question

How to execute a MS-DOS Batch File in Windows 7?

Last response: in Windows 7
Share
March 28, 2012 5:45:14 PM

Hello,
How to execute a MS-DOS Batch File in Windows 7?
March 28, 2012 5:58:36 PM

Double click it.
m
0
l
March 28, 2012 6:54:40 PM

When I double click it, the operating system thinks it is a document and opens it with Notepad/Wordpad.
m
0
l
Related resources
March 28, 2012 6:55:20 PM

willard said:
Double click it.

When I double click it, the operating system thinks it is a document and opens it with Notepad/Wordpad.
m
0
l
a b $ Windows 7
March 28, 2012 7:01:55 PM

Nova315 said:
When I double click it, the operating system thinks it is a document and opens it with Notepad/Wordpad.

Right click and run.
m
0
l
March 28, 2012 7:07:08 PM

Are you sure the file is named as a batch file, like batch.bat and not as a text file, like file.batch.txt? If you create a batch file in notepad it will append the .txt extension and it will not run. By default known extension types are hidden in Windows so you won't even notice the problem.
m
0
l
a b $ Windows 7
March 28, 2012 7:21:08 PM

did you try to run it as administrator
m
0
l
March 28, 2012 7:22:09 PM

The properties of the file are:

Type of file: BAT File (.BAT)
Description: FTP-TEST.BAT


m
0
l
a c 228 $ Windows 7
March 28, 2012 7:30:10 PM

Does it run if you change the extension to .cmd instead of .bat?
m
0
l
March 28, 2012 7:30:11 PM

Write your commands in notepad.

Save as "name.bat"

Double click to run
m
0
l
March 28, 2012 7:30:26 PM

scout_03 said:
did you try to run it as administrator


I'm the admin. on this laptop, how do I go about running "it as a administrator?"
m
0
l
March 28, 2012 7:38:50 PM

Hawkeye22 said:
Does it run if you change the extension to .cmd instead of .bat?


Yes, it did execute successfully. Is there something I can do, besides changing the extension, to get this to work?
m
0
l
a b $ Windows 7
March 28, 2012 7:42:31 PM

on my research on the net they tel you you have to run them as administrator for the same as a file you could not open in windows the os know your administrator of computer but you have to take complete power on a file your have to be set as administrator means the one that could do change in the files
m
0
l
a c 228 $ Windows 7
March 28, 2012 7:44:10 PM

You can fix it by going to Control Panel > Programs > Default Programs > Set Associations and set it back to what it should be.

Someone posted a registry fix. Use it at your own risk, but it seems to have worked for someone else. It's listeed in one of the posts below.

http://www.sevenforums.com/general-discussion/53877-bat...
m
0
l
March 28, 2012 7:49:36 PM

scout_03 said:
on my research on the net they tel you you have to run them as administrator for the same as a file you could not open in windows the os know your administrator of computer but you have to take complete power on a file your have to be set as administrator means the one that could do change in the files


In Production, this file is located on our LAN for a few people to use, what must be done in this case?
m
0
l
a c 228 $ Windows 7
March 28, 2012 8:16:00 PM

That has nothing to do with batch files opening in notepad. The file association has been changed and needs changed back to it's default.
m
0
l
January 6, 2014 3:41:45 AM

The problem is that my default, Windows7 doesn't run a .bat file when you double click on it, or open a command window with adminstrator's priveleges. TotalCommander (what was Norton Commander) gets round this for you automatically (i.e. you don't need any addtionaly steps), or you could use a Cygwin window.
m
0
l
!