Submitted By: Rudy Messex, U.S. Army

This file gathers network information about the computer it is run on. This includes such information as hostname, network adapters, and active network connections.

Visual Basic
Edit|Remove
@echo off
rem ***********************************
rem Script: Network Configuration Script
rem Creation Date: 3 May 2005
rem Last Modified: 3 May 2005
rem Author: Rudy Messex
rem email: rufus.messex@setaf.army.mil
rem ***********************************
rem Description: This script will dump system
rem              Configuration information
rem              including OS version, system
rem              name and ipconfiguration into
rem              a text file located at:
rem              c:\Scripts\%File_Name%.txt
rem ***********************************

rem Set the title to read system information
title System Information

rem Set the background color to Black, and text to bright green
color 0A

rem Change to a directory where the commands work
cd C:\Documents and Settings\

echo.
echo      The hostname appears below.  Please type the hostname EXACTLY as it appears below.  
echo If you make a mistake, please run this script again. 
echo.

hostname

echo.
echo.
echo Enter the hostname here:

@echo off 
set /P File_Name= 
set extension=.txt

rem Start the header info
echo The system hostname is: > c:\Scripts\%File_Name%%extension%

rem To enter a blank line you must enter echo.
echo.  >> c:\Scripts\%File_Name%%extension%

rem call up the commands
(hostname & ver & ipconfig -all & netstat -a) >> c:\Scripts\%File_Name%%extension%


echo. >> c:\Scripts\%File_Name%%extension%
echo. >> c:\Scripts\%File_Name%%extension%
cd c:/
vol >> c:\Scripts\%File_Name%%extension%

(echo. & echo %date% & echo %time%) >> c:\Scripts\%File_Name%%extension%

pause
rem Command to close
exit