Hi all,
In a windows domain the loginscript is executed at logon.
A lot off machine's have very strange names, and I don't know where they
are.
If I could determine the username for each machine, it will make life
easier. Also determinig the File System would become handy since some of the
old pre installed boxes are still formatted as FAT32.
All output will be writen to a text file.
Until now i've tried the following in a dos batch script:
-------------------------------------
For the username I use :
echo %USERNAME%
this works for me
-----------------------------------------------
For the hostname I use the command :
Hostname
This works for now, but I would like to use it as a string, so I can name
the file that has been written as ID_%HOSTNAME%_%USERNAME%
Q: Anyone knows how to use the result of hostname ?
---------------------------------------------------------
For the filesystem I use :
chkdsk C:\ /L
This will return the FStype but *only* logged on as administrator
Q: any other way of determining FS ?
------------------------------------------
BTW: I really want to use the dos commands , please do not point me to third
party software.
Regards,
Roland
|