There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot bsod computer connection crash css dell drive driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking outlook outlook 2003 outlook express printer problem problems ram router slow sound sprtcmd.exe startup trojan usb virus vista windows windows xp wireless
DOS/PDA/Other
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
Have Batch File Create Log of Output


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
briang's Avatar
Member with 43 posts.
 
Join Date: Jul 2004
Experience: Desktop Technician
26-Jul-2004, 03:54 PM #1
Have Batch File Create Log of Output
I know this is simple. Can someone throw me a bone here. I googled it up and came out empty. I tried using Write, but that didnt work. Thanks in advance.

-Brian Gonzalez
brian.gonzalez@cc.partsearch.com
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
26-Jul-2004, 04:04 PM #2
A little more info please. What log files are you trying to output and to what?
briang's Avatar
Member with 43 posts.
 
Join Date: Jul 2004
Experience: Desktop Technician
26-Jul-2004, 04:12 PM #3
Quote:
Originally Posted by Rockn
A little more info please. What log files are you trying to output and to what?
sure sorry about that. I want to use the attached batch file, which tells what users are sitting at what station, and i want to add a date and time in the batch and then have it all output to a txt file, so i can look back and see what users where sitting where, because in the environment i support there are over 100 users sitting in diff. seats everyday. Thanks.

-Brian Gonzalez
brian.gonzalez@cc.partsearch.com
Attached Files
File Type: zip whoiswhere.zip (727 Bytes, 259 views)

Last edited by briang : 26-Jul-2004 07:23 PM.
Squashman's Avatar
Distinguished Member with 12,698 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
26-Jul-2004, 10:27 PM #4
Is this on a Windows Domain with Active Directory. This can probably be solved alot easier if it is. You can just setup a group policy to Audit all logon events.

Or

You could also use NBTscan on your computer to find out who is logged onto every computer on your network. This is a pretty awesome utility. I think you will like it better than using Net View and NBTstat.
http://www.inetcat.org/software/nbtscan.html

Quote:
NBTscan is a program for scanning IP networks for NetBIOS name information. It sends NetBIOS status query to each address in supplied range and lists received information in human readable form. For each responded host it lists IP address, NetBIOS computer name, logged-in user name and MAC address.
NBTdump is another good program as well.

To answer your original question. To direct output to a file you just use the greater-than symbol to write to a file and two greater-than symbols to append to a file.

Code:
C:\nbtscan>echo write this text to a file > filename.txt

C:\nbtscan>type filename.txt
write this text to a file

C:\nbtscan>echo append this text to a file >> filename.txt

C:\nbtscan>type filename.txt
write this text to a file
append this text to a file

C:\nbtscan>
__________________
I hate asking the same question twice!
How to ask questions the smart way!
Microsoft MVP - Windows Shell/User

Last edited by LwdSquashman : 26-Jul-2004 11:29 PM.
briang's Avatar
Member with 43 posts.
 
Join Date: Jul 2004
Experience: Desktop Technician
27-Jul-2004, 06:49 PM #5
NBTscan
Have you tested this application in a Windows XP environment?. All of our machines do not have the NetBios protocol installed. Is there another way to do that?. thanks
Squashman's Avatar
Distinguished Member with 12,698 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
27-Jul-2004, 07:33 PM #6
You are confusing Netbios with Netbeui.

I believe Netbios over TCP/IP is turned on by default on all Windows Operating Systems.

I have two Windows XP desktops and one 2000. It works just fine on my home network. I have also used it at work and at school.
briang's Avatar
Member with 43 posts.
 
Join Date: Jul 2004
Experience: Desktop Technician
27-Jul-2004, 07:52 PM #7
Quote:
Originally Posted by LwdSquashman
You are confusing Netbios with Netbeui.

I believe Netbios over TCP/IP is turned on by default on all Windows Operating Systems.

I have two Windows XP desktops and one 2000. It works just fine on my home network. I have also used it at work and at school.
O ok. Thank you very much. I will look further into the syntax on the app, because my first attempt was sad at best..lol. Thank you for pointing me in the right direction.

-Brian Gonzalez
brian.gonzalez@cc.partsearch.com
Squashman's Avatar
Distinguished Member with 12,698 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
27-Jul-2004, 11:40 PM #8
nbstat network ip address/subnet

nbtscan 192.168.0.0/24

That will scan all ip addresses from 192.168.0.1 to 192.168.0.255

Right now I only have two Windows machines active on my network. My laptop is turned on but nobody is logged into it so it shows the computer name where it is suppose to show who is logged on.

Code:
C:\nbtscan>nbtscan 192.168.0.0/24
Doing NBT name scan for addresses from 192.168.0.0/24

IP address       NetBIOS Name     Server    User             MAC address
------------------------------------------------------------------------------
192.168.0.0     Sendto failed: Cannot assign requested address
192.168.0.1     Recvfrom failed: Connection reset by peer
192.168.0.109    LFE_MOBL_SQUASH  <server>  LFE_MOBL_SQUASH  00-06-04-9e-69-18
192.168.0.119    SQUASH           <server>  SQUASHMAN        10-32-ba-c0-52-32

C:\nbtscan>
In this example I am logged onto Computer SQUASH and logged in as SQUASHMAN. You can see on my laptop that nobody is logged onto it because the computer name is the same as the username.
__________________
I hate asking the same question twice!
How to ask questions the smart way!
Microsoft MVP - Windows Shell/User

Last edited by LwdSquashman : 28-Jul-2004 10:16 AM.
briang's Avatar
Member with 43 posts.
 
Join Date: Jul 2004
Experience: Desktop Technician
28-Jul-2004, 02:11 PM #9
nbtscan not working.
I tried to perform a scan for all machines from 10.3.10.1 to 10.3.10.30 and i got this response?. thanks again in advance for the hel.

C:\>nbtscan 10.3.10.1/30
Doing NBT name scan for addresses from 10.3.10.1/30

IP address NetBIOS Name Server User MAC address
------------------------------------------------------------------------------
10.3.10.1 Recvfrom failed: Connection reset by peer
10.3.10.3 Recvfrom failed: Connection reset by peer
Squashman's Avatar
Distinguished Member with 12,698 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
28-Jul-2004, 02:26 PM #10
Quote:
Originally Posted by briang
nbtscan not working.
I tried to perform a scan for all machines from 10.3.10.1 to 10.3.10.30 and i got this response?. thanks again in advance for the hel.

C:\>nbtscan 10.3.10.1/30
Doing NBT name scan for addresses from 10.3.10.1/30

IP address NetBIOS Name Server User MAC address
------------------------------------------------------------------------------
10.3.10.1 Recvfrom failed: Connection reset by peer
10.3.10.3 Recvfrom failed: Connection reset by peer
You are doing it wrong. If you want to scan all addresses between 10.3.10.1 to 10.3.10.30 you would do it like this.
Code:
nbtscan 10.3.10.1-30
I have a class c network so it looks like this.
Code:
C:\nbtscan>nbtscan 192.168.0.100-253
Doing NBT name scan for addresses from 192.168.0.100-253

IP address       NetBIOS Name     Server    User             MAC address
------------------------------------------------------------------------------
192.168.0.109    LFE_MOBL_SQUASH  <server>  ADMINISTRATOR    00-08-02-9d-69-18
192.168.0.119    SQUASH           <server>  SQUASHMAN        12-34-ba-c0-52-32

C:\nbtscan>
The /24 is for the subnet. Not how many IP addresses you want to scan.

Just type nbtscan at the dos prompt. It will show you some examples and what switches you can use to get different output.
__________________
I hate asking the same question twice!
How to ask questions the smart way!
Microsoft MVP - Windows Shell/User
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 04:53 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.