Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

I would like to search all the PCs on the domain for specific information within a specifc file and export it.?

Every computer on the domain has a file named "SMBiosDump.txt" in "c:\zenworks". Within this file exists information about the workstation, specifically make, model and serial number. How can I export these three values along with the host name to a csv/excel file that I can then import into a db. Below is what the portion of the "SMBiosDump.txt" file that I would like to search.

[003] Sytem Information

{0x0100] Type:001 Size:27(0x1b)

Manufacturer: 'Dell Inc.'

Product Name:'OptiPlex 755'

Version:''

Serial Number: 'X212311'

Any Help Would Be Great!

Thank You!!!!

2 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    My first instinct is to look beyond the question and try to

    guess why you want to collect this information. The answer

    that comes to me is that you want to manage your network

    "inventory", and to do that, you'd be way ahead of the game

    with some dedicated software to do just that. If so, then

    relax! You do not have to spend a lot to do this! Just go

    to Spiceworks.com (see link in sources) and download their

    FREE software. No; I do not work for or with them, or have

    any other association, direct or indirect. I have used their

    software in the past, and it works well.

    However, what you *asked* was fairly specific, so here is

    what I have. Note that I have assumed that you are on a

    Windows-based computer, accessing other Windows-based computers.

    If you were on a UNIX/Linux system, the scripting ("batch file")

    tools are so much more powerful that we'd have many more options.

    Note that some of the steps are a little convoluted; this

    is because the "DOS" scripting capabilities are rather

    limited, so I have had to really push things to get this

    exactly right.

    First, establish some folder on your computer where you want

    all of this processing to occur; create a new one if you

    don't already have some place in mind. Depending on the

    size of your network, there may be quite a few files to be

    processed, and it's a good idea to keep things separate from

    your other files to avoid confusion (and errors!). In the

    solution that I have provided, I assume that you are using

    a folder called Network_Inventory and that it is on your

    C: drive.

    In this folder, use your favorite text editor (Notepad, the

    DOS "EDIT" command, whatever) and create a file called

    copy_file.bat. In this file, type the following commands

    (actually, you'll be *much* better off if you can cut-and-

    paste from here, but you do whatever works for you):

    ********************************************************************************

    @ECHO OFF

    REM

    REM Get into the working folder

    REM

    C:

    CD \Network_Inventory

    REM

    REM This batch file will be invoked by another bath file,

    REM and the name of the target computer on the network

    REM will be passed in as a parameter. The next two lines

    REM will process the network name to remove the leading

    REM backslash characters

    REM

    SET computer_name=%1

    SET computer_name=%computer_name:\=%

    REM

    REM Now establish a mapped network drive to the remote

    REM computer. You need to edit this part as follows:

    REM replace the drive letter "X" with another, if "X" is already in use

    REM replace "[username]" and "[password]" with appropriate

    REM values for your network. If you do not have a single

    REM username that is able to log into every machine, then

    REM stop now; this solution WILL NOT WORK!

    REM

    REM Other notes: This batch file will have the CLEARTEXT

    REM (i.e. NOT encrypted) username and password right there where

    REM anyone with access to your computer can see them. Use this

    REM solution SPARINGLY and WITH EXTREME CAUTION!!!

    REM

    NET USE X: /DELETE

    NET USE X: %1\C$ [password] /USER:[username]

    REM

    REM Let's make sure that there is a file here before we try to copy it!

    REM

    IF NOT EXIST X:\zenworks\SMBiosDump.txt GOTO Wrapup

    REM

    REM Copy the file from the remote computer into the current working folder.

    REM For now, use the temporary file name "staging.txt".

    REM

    XCOPY X:\zenworks\SMBiosDump.txt staging.txt

    REM

    REM Now the real fun begins: it will greatly simplify your job

    REM later if we can "clean up" the file now by removing lines

    REM that are not needed in the final list. This gets complicated;

    REM do NOT change even the punctuation in these lines unless

    REM you are sure that you know what you are doing!

    REM

    FIND "Manufacturer" staging.txt > staging1.txt

    FIND "Product Name" staging.txt >> staging1.txt

    FIND "Serial Number" staging.txt >> staging1.txt

    REM

    REM We have stripped out the lines that we want, but the FIND

    REM command has actually *inserted* some more lines that we

    REM don't want, either. So, let's get rid of them! Follow me...

    REM

    FOR /F "tokens=* delims=" %F IN (staging1.txt) DO @ECHO %A >> staging2.txt

    FIND /V "----------" staging2.txt > staging3.txt

    FOR /F "tokens=2,3 skip=2 delims=" %A IN (staging3.txt) DO @ECHO %A >> %computer_name%.sbd

    REM

    REM We should now have a .txt file whose name is the network name

    REM of the computer from which we got it, and the contents are

    REM just the three values that we want. So, we can delete the

    REM temporary, "staging" files...

    REM

    DEL staging*.txt

    REM

    REM Final cleanup before exiting

    REM

    :Wrapup

    NET USE X: /DELETE

    ********************************************************************************

    Save this file and edit a new one: main_loop.bat

    ********************************************************************************

    @ECHO OFF

    REM

    REM Get into the working folder

    REM

    C:

    CD \Network_Inventory

    REM

    REM Use the "net use"

  • Anonymous
    5 years ago

    Some parts of the answer to this would be clearly defined: God, heaven, hell, souls, etc. would be in the realm of religion; I think the only things that wouldn't be would be math, engineering, and physical sciences. The problem beyond that is, the answer depends upon whom you ask. Many people would probably give different answers as to what determines morality. And morality has its implications spread throughout the individual's role in society, society's role in the environment, law & government, and even beyond that, into entertainment, fashion, industry, diet, education, etc. And anything that any religious document or belief makes specific reference to, will cause that group to believe that thing is in the realm of religion, even if it isn't to everyone else (the creation/evolution of man); or worse, a different religious group could believe something entirely different about the same thing. (Jerusalem or the Gaza Strip).

Still have questions? Get your answers by asking now.

Archived content

This is an archived copy of Yahoo Answers captured and hosted by QuantCDN.