How Do I Get a Batch File to Run on Vista?

  • Thread starter Thread starter jim evans
  • Start date Start date
J

jim evans

I have a computer illiterate friend who is an author. He composes his
manuscripts in Word but knows nothing else about his computer. I
tried to help him automate some processes using batch files just to
discover I can't make batch files work in Vista. I followed this
procedure
http://www.vistaclues.com/run-a-batch-file-as-an-administrator/

It throws up the UAC prompt but seems to do nothing when you click the
button to authorize it.

How do I make batch files work in Vista?

jim
 
That procedure authorises a BAT file to run as Administrator by amending
it's properties. To run a BAT file goto [Start] [Accessories] [Command
Prompt].

If I have to have him do anything that elaborate, I might as well set
him up with cookbook scripts to follow. I was trying to set him up
with batch files he simply double-clicks on to do the actions.

I take it from your reply there's no way in Vista to run a batch file
in a simple straightforward way like you can in XP, NT or Win9x. I'm
beginning to understand the negative feelings about Vista.

jim
 
jim evans said:
I have a computer illiterate friend who is an author. He composes his
manuscripts in Word but knows nothing else about his computer. I
tried to help him automate some processes using batch files just to
discover I can't make batch files work in Vista. I followed this
procedure
http://www.vistaclues.com/run-a-batch-file-as-an-administrator/

It throws up the UAC prompt but seems to do nothing when you click the
button to authorize it.

How do I make batch files work in Vista?

jim


Jim,

What is this batch file attempting to accomplish? I can run a bat file here,
with UAC enabled, without getting a UAC prompt. (But then I'm not doing
anything other than throwing a pause command in the batch file...)

Setting the batch file to run as administrator -will- throw a UAC prompt
when UAC is enabled. Are you sure this batch file -needs- to run as
administrator? What happens if your friend just tries to run the bat file by
double clicking on it? (Without having "run as administrator" set.)

Lang
 
I simply right click on the batch file and drag to the desktop or taskbar,
then select create short cut. UAC is enabled but causes no problem when the
batch file is run. It does not pop up. I do not have run as administrator
selected in the shortcut properties. My batch files are simple copy
commands to a USB stick drive or DVD.

Stuart
 
Well, it's a little embarrassing but here's the answer. Apparently
when Windows is set to not show extension of files with known parents
it NEVER shows them. I thought it just didn't show them in Explorer,
but even when you highlight the name to change it, it doesn't show the
extension. So, if you highlight a file name, delete it entirely and
rename it you really don't delete it entirely -- the extension is
still there, just invisible. So, if you create a new file using the
Right Click > New menu you can never get rid of the .txt extension.
No matter what you do the .txt extension remains. So when you rename
it to bat it becomes bat.txt.

You have to create it in an application like Notepad and save it as a
..bat file or it's still a text file.

jim
 
Well, it's a little embarrassing but here's the answer. Apparently
when Windows is set to not show extension of files with known parents
it NEVER shows them. I thought it just didn't show them in Explorer,
but even when you highlight the name to change it, it doesn't show the
extension. So, if you highlight a file name, delete it entirely and
rename it you really don't delete it entirely -- the extension is
still there, just invisible. So, if you create a new file using the
Right Click > New menu you can never get rid of the .txt extension.
No matter what you do the .txt extension remains. So when you rename
it to bat it becomes bat.txt.

You have to create it in an application like Notepad and save it as a
.bat file or it's still a text file.

jim

That problem goes back several generations of windows. Always show
file extensions.

Yet another example where dumbing-down windows just makes it
impossible to get real work done.
 
Back
Top