Vista batch file execution issues.

April 27, 2009 at 05:42:18
Specs: Windows Vista
I have a batch file with one simple command "pskill -t <program>.exe". When I enter the exact command into command line, it works just fine. When I try to double-click the batch file, it doesn't do anything. I have UAC turned off, so I know it's can't be the run as admin issue.

Also, When I try to execute the batch file from command line via "C:\Users\Nick\foo.bat", I get back:

'▐p' is not recognized as an internal or external command, operable program or batch file.

Any ideas?


edit- also I should note that I fixed the file association issue, ie the "foo.bat.txt". The file is indeed "foo.bat". Windows explorer shows the file as a windows batch file.


See More: Vista batch file execution issues.

Report •


#1
April 27, 2009 at 05:59:19
[1] Does the bat really have greater than and less than in it?

[2] I don't know what the error looked like before you pasted it here. But it looks like high bit ascii junk.

[3] It might help to post the bat.


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#2
April 27, 2009 at 06:17:47
Thanks for the quick reply!

1) No, it doesn't have greater-than or less than signs in it

2) The error was not directly copy-pasted, but the error did indeed have high level ascii in that same location

3) I'll try and figure out where the attachments link is...file available for download at http://www.filesavr.com/foo


Report •

#3
April 27, 2009 at 07:29:34
Your problem is obvious. [As the actress said to the bishop.]

The bat is junked up. The first 6 chars are:

FF FE 70 00 73 00


=====================================
If at first you don't succeed, you're about average.

M2


Report •

Related Solutions

#4
April 27, 2009 at 07:48:06
You seem to have saved the file as Unicode.
To fix it, reopen it in Notepad (or whatever editor you have used) and then Save As ANSI.

Report •

#5
April 27, 2009 at 07:48:12
That's odd, I don't see that at all...I even tried downloading from the link I gave, and opening in wordpad instead of notepad. I still don't see it.

Report •

#6
April 27, 2009 at 07:56:00
That was it! Thanks so much guys!

Report •

#7
April 27, 2009 at 08:31:14
"I still don't see it."

You need a hex viewer.

For a one-liner you don't even need an editor:

echo blabla.exe -a -bla > foo.bat


=====================================
If at first you don't succeed, you're about average.

M2


Report •


Ask Question