Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Processing a Computer List

Reply
Thread Tools

Processing a Computer List

 
 
SimonH
Guest
Posts: n/a
 
      06-02-2007
Hi guys hope you can help me with a perl script.

We are running multiple platforms - NT and XP.
I have a computer list in computers.txt
Each system has a local administrator account, let's say it is
<computername>\administrator, with password 'password'.

What I need to do is to:
1) Determine if the system is NT or XP
2) If it is NT, then connect by <computername>\administrator, with password
'password', then write a line to an output file called output.txt the status
of the browser service. So the format of the output.txt would be something
like:
<computername>, operatingsystem, servicename, status
3) If it is XP, then connect by <domain1>\simon, with password 'simtest',
then write a line to an output file called output.txt with the same 4
columns as 2).
4) While the script is running, a status of 'connecting to <computername>
would be great.

Any help greatly appreciated.

Simon


 
Reply With Quote
 
 
 
 
SimonH
Guest
Posts: n/a
 
      06-02-2007
Hi Len!

Thanks for this...but Im really looking at a perl solution for this. Thanks
very much to you anyway. Appreciate it.

"l v" <> wrote in message
news:...
> SimonH wrote:
>> Hi guys hope you can help me with a perl script.
>>
>> We are running multiple platforms - NT and XP.
>> I have a computer list in computers.txt
>> Each system has a local administrator account, let's say it is
>> <computername>\administrator, with password 'password'.
>>
>> What I need to do is to:
>> 1) Determine if the system is NT or XP
>> 2) If it is NT, then connect by <computername>\administrator, with
>> password 'password', then write a line to an output file called
>> output.txt the status of the browser service. So the format of the
>> output.txt would be something like:
>> <computername>, operatingsystem, servicename, status
>> 3) If it is XP, then connect by <domain1>\simon, with password 'simtest',
>> then write a line to an output file called output.txt with the same 4
>> columns as 2).
>> 4) While the script is running, a status of 'connecting to <computername>
>> would be great.
>>
>> Any help greatly appreciated.
>>
>> Simon

>
> Not a Perl solution, but if you have a copy of Microsoft's srvinfo.exe I
> believe you can determine this information without the need to
> authenticate.
>
>
> C:\>srvinfo.exe
>
> Server Name: SPARKY
> Security: Users
> NT Type: NT Advanced Server - Personal
> Version: 5.1
> Build: 2600, Service Pack 2
> Current Type: Uniprocessor Free
> Product Name: Microsoft Windows XP
> Registered Owner: len
> Registered Organization:
> ProductID: xxxxx-OEM-xxxxxxxx-xxxxx
> Original Install Date: Wed Sep 25 21:25:42 2002
> Domain: Error 2
> PDC: Error 2453
> CPU[0]: x86 Family 15 Model 2 Stepping 4: 2519 MHz
> Hotfixes:
> [ServicePackUninstall]:
> [Q147222]:
> [KB932168]:
> [KB931836]:
> [KB931784]:
> [KB931768]:
> [KB931261]:
> ....
> [KB873339]:
> [KB873333]:
> Drive: [FileSys] [ Size ] [ Free ] [ Used ]
> C$ NTFS 38147 15650 22497
> D$ NTFS 114479 89074 25405
> G$ NTFS 238473 164957 73516
> Services:
> [Stopped] Adobe LM Service
> [Stopped] Alerter
> [Running] Application Layer Gateway Service
> [Stopped] Application Management
> [Running] Windows Audio
> [Running] Background Intelligent Transfer Service
> [Running] BrSplService
> [Running] Computer Browser
> [Stopped] Indexing Service
> [Stopped] ClipBook
> [Stopped] COM+ System Application
> [Running] Cryptographic Services
> [Running] DCOM Server Process Launcher
> [Running] DefWatch
> [Running] DHCP Client
> ....
> [Stopped] Network Provisioning Service
> Network Card [0]:
> Network Card [1]:
> System Up Time: 0 Days, 0 Hr, 7 Min, 32 Sec
>
> or
>
>
> Server Name: serv700
> Security: Users
> NT Type: NT Member Server - Enterprise
> Version: 5.0
> Build: 2195, Service Pack 4
> Current Type: Uniprocessor Free
> Product Name: Microsoft Windows 2000
> Registered Owner: home
> Registered Organization: home
> ProductID: xxxxx-xxx-xxxxxxx-xxxxx
> Original Install Date: Sun Dec 17 13:24:27 2000
> Domain: Error 2
> PDC: Error 1717
> IP Address: 192.168.1.37
> CPU[0]: x86 Family 15 Model 6 Stepping 5: 3341 MHz
> Hotfixes:
> [Update Rollup 1]:
> [ServicePackUninstall]:
> [Q828026]:
> [Q147222]:
> [KB932168]:
> [KB931784]:
> [KB931768-IE6SP1-20070219.120000]:
> [KB930178]:
> [KB929969-IE6SP1-20061220.120000]:
> ...
> [KB329115]:
> Drive: [FileSys] [ Size ] [ Free ] [ Used ]
> C$ NTFS 15359 11388 3971
> D$ NTFS 137267 96209 41058
> Services:
> [Running] Alerter
> [Stopped] Application Management
> [Stopped] Background Intelligent Transfer Service
> [Running] Computer Browser
> [Stopped] Indexing Service
> [Stopped] ClipBook
> [Running] Distributed File System
> ...
> [Stopped] Wireless Configuration
> Network Card [0]:
> System Up Time: 5 Days, 18 Hr, 8 Min, 35 Sec
>
>
> --
>
> Len



 
Reply With Quote
 
 
 
 
Dr.Ruud
Guest
Posts: n/a
 
      06-03-2007
Beware, multi-posted here, with a different Subject:
"Computer List (Pls hlp!)".

--
Affijn, Ruud

"Gewoon is een tijger."

 
Reply With Quote
 
SimonH
Guest
Posts: n/a
 
      06-03-2007
Thanks Bob....really appreciate it.
"l v" <> wrote in message
news:...
> Bob Walton wrote:
>> SimonH wrote:
>>> Hi Len!
>>>
>>> Thanks for this...but Im really looking at a perl solution for this.
>>> Thanks very much to you anyway. Appreciate it.

>>
>> Well then [untested]:
>>
>> perl -e "print `srvinfo.exe`"
>>
>> ...
>>>> C:\>srvinfo.exe

>>

>
> That was my first thought and what I do when there is an existing tool
> which gives me exactly what I want.
>
> Simon - you may want to look at Win32:rocess::Info.
>
> --
>
> Len



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
computer spares price list | newly added Canada country price list| Nandhu Python 0 12-04-2007 02:56 PM
Computer policy processing =?Utf-8?B?TWF0dFJpZGQ=?= Wireless Networking 1 04-12-2005 06:08 PM
Post-Processing RAW vs Post-Processing TIFF Mike Henley Digital Photography 42 01-30-2005 08:26 AM
Question: processing HTML, re-write default processing action of many tags Hubert Hung-Hsien Chang Python 2 09-17-2004 03:10 PM
Difference Between List x; and List x(); , if 'List' is a Class? roopa C++ 6 08-27-2004 06:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57