Collecting the output from a command in Windows from users that are not computer savvy

5

2

I was wondering what is the easiest way to collect the output from a command in Windows from users that are not computer savvy.

E.g. For example, If I need to collect the output from ipconfig from 20 people, I would like to have something that allows them to do something like this:

ipconfig /all > mail name@domain.com

The users are not computer savvy and I can't make assumptions about what version of Windows they have installed (although I know they are all XP or post-XP)

Thanks

Amelio Vazquez-Reina

Posted 2011-05-13T15:38:17.000

Reputation: 5 686

Answers

4

Write a batch file which outputs the results to a text file, then ask them to send you the text file, or use the command-line FTP client to upload the text file somewhere. I put the file in the current directory the script is running from (%cd%) and named it results_%computername% so that when you get these various files you can tell which came from which computer.

@echo off
ipconfig /all > "%cd%\results_%computername%.txt"

You would then have to create an FTP script, which automates the process of uploading the file to an FTP server.

nhinkle

Posted 2011-05-13T15:38:17.000

Reputation: 35 057

if you removed %CD%\ then wouldn't that ipconfig line still cause the file to be created in the current directory? – barlop – 2011-05-13T22:25:19.987

@barlop yes, it would I suppose. – nhinkle – 2011-05-13T22:39:21.210

This is a very good idea. For some reason I always forget that windows has a command-line FTP utility. – Fopedush – 2011-05-16T16:05:39.550

3

Windows does not have a built-in mail utility for the command line. Barring access to all of these people's computers, most likely what you would have to do is ask them to run ipconfig /all > somefile.txt, and then manually mail you the contents of this file. I realize that this might not be ideal for users who are not very savvy, but it is about the only way I can think of that doesn't involve installing custom software on each machine.

If, on the other hand, you have access to all of these machines, you could install a utility such as bmail, and provide the users with the appropriate instructions. Keep in mind you still need to provide it with an SMTP server/connection information, so you might need to throw together a batch file to keep your users from having to type all that out.

Fopedush

Posted 2011-05-13T15:38:17.000

Reputation: 1 723

2

This also might not be the greatest option in the world, but rather than having them run ipconfig /all >somefile.txt then trying to find that file and attach it to the e-mail, they COULD right click on the title bar of the command prompt window and go to Edit --> Select All then press Enter to copy all and then paste it into the body of an e-mail they could send to you.

dchanson

Posted 2011-05-13T15:38:17.000

Reputation: 41

0

If their Internet connection's working fine, you could have them go here and enter your email address there so they can send it to you. If you need more fine-grained details from CLI tools, then I think nhinkle's answer might be the best option.

Isxek

Posted 2011-05-13T15:38:17.000

Reputation: 3 785