Home / Microsoft / Microsoft DOS / help with batch file
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: help with batch file  (Read 1720 times)
aardvark
Guest
« on: July 24, 2006, 10:09:46 AM »

I have a batch file
Code: [Select]
getmac /NH /FO LIST > C:\MACadds\%COMPUTERNAME%.txt
exit
it works from the cmd prompt but when put in a batch it doesn't, it creates an empty file named as the the computer name, can anyone help?
cheers
IP logged
Dilbert
Moderator
Egghead



Thanked: 40
Posts: 3,480

Welcome to ComputerHope!

« Reply #1 on: July 24, 2006, 11:46:43 PM »

"getmac"? Is that even a valid command? I'm getting an error trying it with the /? switch. :-?
IP logged

"The geek shall inherit the Earth."
ghostdog74
Mentor



Thanked: 26
Posts: 1,511


« Reply #2 on: July 25, 2006, 12:47:47 AM »

yes, its valid command.
IP logged

uli_glueck
Guest
« Reply #3 on: July 25, 2006, 12:58:41 AM »

It is from the ressource kit.

uli
IP logged
aardvark
Guest
« Reply #4 on: July 25, 2006, 12:59:26 AM »

indeed it is...
From Microsoft's site
I have changed the batch file to use the full path to it...
Code: [Select]
C:\windows\system32\getmac.exeas I am running it from a network (mapped) drive.

....and it now works
« Last Edit: July 25, 2006, 11:03:22 AM by aardvark » IP logged
Dilbert
Moderator
Egghead



Thanked: 40
Posts: 3,480

Welcome to ComputerHope!

« Reply #5 on: July 25, 2006, 01:40:14 PM »

My aplology for not understanding. That's odd that I don't have it... hmm...
IP logged

"The geek shall inherit the Earth."
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / help with batch file « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.079 seconds with 20 queries.