Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PC information?

Status
Not open for further replies.

sergelaurent

Technical User
May 30, 2005
52
0
0
FR
Hi,

I am trying to collect information about the PC to write it back in my report!!!

Is there a tcl command to collect these information? (information such as CPU, size of memory, size of hard disk, os used....)
 
I think your best bet would be the registry command (assuming your PC is Windows):
registry get keyName valueName
Returns the data associated with the value valueName under the key keyName. If either the key or the value does not exist, then an error is generated.

_________________
Bob Rashkin
 
registry get "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\ProcessorNameString" toto
puts $toto;

I have tried this code, but I got:
invalid command name "registry"invalid command name "registry"
while executing
"registry get "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\ProcessorNameString" toto"
invoked from within
"DbgNub_uplevelCmd 1 $icode"
(procedure "source" line 151)
invoked from within
"source $argv0"

Can someone tell me how this command works and how can I make good use of it?
 
I think the registry returns the value to a separate variable, so your command would be:
Code:
set toto [registry get "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\ProcessorNameString" [red]value name[/red]]

I try to stay away from the registry so I don't know what KeyName ValueName pairs you would use. If you aren't timid about going into the registry, you might find what you're looking for with regedit from the OS.

_________________
Bob Rashkin
 
make sure you include
package require registry 1.0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top