Hi,
the answer is not easy but this functions very well:
----------- Inventory.cmd ------------------------
Echo off
Echo .
::First look if an old files Exisist and delete them
IF exist IPAdress.tmp del IPAdress.tmp
::Now we get the current Ipadress with IPconfig in a tmpfile
IPconfig >IPAdress.tmp
Echo .
::Now put all the info in one File
For /F "Skip=6 tokens=2,2* delims=:" %%a in (IPAdress.tmp) do @Echo %Computername% %Username% %%a %%b >>inventory.txt
Echo .
---------------------------------------------------------
This script functions only under NT (Server/Workstation) cause U don?t have the Environment variables like Computername and username und WIN9X by design !!
Hope it helps
Frobo