I cant run .bat files on my vista computer

February 4, 2011 at 12:03:45
Specs: Windows Vista
For as long as i can remember i have never been able to run .bat files. I have always looked on google for answers but could never find any. when i attempt to open a .bat file i have to select what to open the file with. I have tried opening it with command prompt. but that doesnt work. i tried opening it with java, and it still didnt work. When i try opening with java it says "unable to launch the application" and the icon for the .bat file is a blank piece of paper. Can someone please help me?

See More: I cant run .bat files on my vista computer

Report •


#1
February 4, 2011 at 12:31:21
donut man19 it appears you don't understand what a bat [batch] file is.

You either run a bat file or you edit a bat file. You would never "open" at bat file with any of the programs you listed.

Here are some exercises that will hopefully clarify this for you.

Go to a cmd prompt
type copy con test.bat [hit enter]
now type @echo off [hit enter]
now type echo this is a test [hit enter]
now hit F6 and hit enter [you will see a z]
hit enter again and you will see "one file copied"

You just made a batch file.

Now run it by typing test and hit enter
You will see "this is a test"

To edit this batch file type edit test.bat and hit enter
You will see the lines you added originally.
Add a line at the bottom echo 2nd test and then save the file.

type test and hit enter
you will see two lines now saying this is a test and 2nd test.

Understand how this works now?

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's


Report •

#2
February 4, 2011 at 12:59:16
But i downloaded something containing a .bat file, and my friend can run it, but i cant run it. I now understand what i .bat file is. but i am a little confused. What am i supposed to do with the .bat file?

Report •

#3
February 4, 2011 at 13:17:35
"What am i supposed to do with the .bat file?"

Good question. What happens/what does the batch file do when your friend runs it?

Or right mouse click on it, select open with and choose notepad. Copy and paste the contents here for review.

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's


Report •

Related Solutions

#4
February 4, 2011 at 13:34:36
@echo off
java -Xms512M -Xmx512M -cp minecraft-server.jar com.mojang.minecraft.server.MinecraftServer
pause

Report •

#5
February 4, 2011 at 15:32:04
donut man19, Try the bat file asociation fix at the link below.
Instructions are on the page.

File association fixes for Windows Vista
http://www.winhelponline.com/articl...

Tufenuf


Report •

#6
February 4, 2011 at 15:59:39
There doesn't appear to be a file association issue Tufenuf.

Though we hadn't gotten to what happens if you donut man19 just double clicked on the file in question. What happens when you do? You should get a black box open with a bunch of stuff and at the end a "press any key to continue"

donut man19 you running a minecraft server? The batch file appears to be a java update for minecraft.

If when you double click nothing happens then Tufenuf saw the issue correctly and has provided you a fix with the link.

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's


Report •

#7
February 4, 2011 at 21:45:15
i dont currently run a server. but i want to. when i double click on it comand prompt comes up and says "java is not recognized as an internal or external command, operable program or batch file. press any key to continue" and when i click a key, the command prompt goes away and nothing else happens. I have also tried other .bat files for different things and they dont work.
P.S. I tried the file association fixer that tufenouf suggested, and still it doesnt work
P.S i got the download from here
http://www.minecraft.net/servers.jsp

Report •

#8
February 5, 2011 at 01:20:44
If it is an update and you don't have the server what is the updater going to do?

Report •

#9
February 5, 2011 at 08:13:34
The batch file works. It is erroring out due to not finding what it was looking for. There is nothing wrong with your system concerning batch files.

Answers are only as good as the information you provide.
How to properly post a question:
Sorry no tech support via PM's


Report •

#10
February 5, 2011 at 10:00:47
I turned my computer on today and my .bat files are working!!! I think I just had to restart my computer after i downloaded the file association fix. But thank you for the information on the minecraft server. I didn't know it was an update. That would explain alot. But every other .bat file i have is working. Thank you very much for all of your time, and help wanderer, Tufenuf, and wizard-fred.


Report •


Ask Question