0

Can anyone show me a good example of how to match it. Maybe I misread the documentation a bunch of times, but it does not even some close to how real tools like grep ought to work. The output of the following command, wmic /output:stdout csproduct get identifyingnumber looks like so.

IdentifyingNumber

ABC1234

wmic csproduct get identifyingnumber | findstr with parameters to remove column header | clip

I am not sure what to do because I cannot find an exact example of what I am looking for my batch file since I need the serial enough. Any thoughts?

EDIT: I like PowerShell, but I really need to know how to do this in batch (must be possible) for XP machines as well. I am just surprised I could not figure this out. I mean, this should be simple!

songei2f
  • 1,924
  • 1
  • 20
  • 30

1 Answers1

2

use powershell do the following

gwmi win32_ComputerSystemProduct | ft IdentifyingNumber -hidetableheaders

tony roth
  • 3,844
  • 17
  • 14
  • Thanks, but was looking for something backwards compatible with some crappy XP images where PS is not installed. I appreciate it though. – songei2f Sep 19 '11 at 03:21
  • And I am a jerk. I forgot I tagged it win7 and not just windows. I changed that after the fact, but shame on me for not asking the question right! – songei2f Sep 19 '11 at 03:23
  • if you happen to have 1 win7 workstation you could still use the remote method! – tony roth Sep 19 '11 at 11:57