Tech Support Forum banner
Not open for further replies.
1 - 2 of 2 Posts

17 Posts
Discussion Starter · #1 ·
Hello i am working on a project were i need to get computer infromation from many users and am making a command line code to do this for me. However i am haveing some issues with my format. my code is as follows:

###time stamp
date /t >>"myinfo.txt"

###Will add the name of the computer to the file
echo Computer Name: >>"myinfo.txt"
hostname >>"myinfo.txt"

###Get IP address
ipconfig | find "IPv4" >> "myinfo.txt"

###Make and modle numbler of computer
wmic csproduct get name >> myinfo.txt

#starts the file
start myinfo.txt

When i do run this i get something like this :

Computer Name:
IPv4 Address. . . . . . . . . . . : 10.*.*.*
N a m e

H P C o m p a q 6 0 0 5 P r o M T P C

As you can tell the Computer name is spread out by a space for every charicter and does not fit the rest of the infromation how do i get my computer modle to show like the rest of the infromation?
1 - 2 of 2 Posts
Not open for further replies.