KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Read out PC-serial and manufactor

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
DBoon
KiXforms Novice
KiXforms Novice


Joined: 16 Oct 2007
Posts: 1

PostPosted: Tue Oct 16, 2007 9:53 am    Post subject: Read out PC-serial and manufactor Reply with quote

Hi guys,

i have startet to program a login script via kix 3days ago.
and now i have a problem how can i read out 2 informations?
First, the Serialnumber of the pc and second, the manufactor of the pc.

Code:

SETCONSOLE("show")
SETCONSOLE("maximized")
SETTITLE("Anmeldeskript für Meine Domäne 2006")
;
;
IF (len(@ipaddress0) = 0)
    $offline_mode="yes"
    $x=$x+"("+$os+" - vs "+$prgrm_version+" - off-line          )"
  ELSE
    $offline_mode="no"
    IF (len(@lserver) = 0)
      $lserver="~lserver  "
    ELSE
      $lserver=@lserver
    ENDIF
    IF (LCASE($domain) = LCASE($ldomain))
      $x=$x+"("+$os+" - vs "+$prgrm_version+" L $domain $lserver)"
    ELSE
      $x=$x+"("+$os+" - vs "+$prgrm_version+" - $domain $lserver)"
    ENDIF
  ENDIF

  IF (len(@ipaddress0) = 15)
    $i=1
    $ip_old=@ipaddress0
    $ip_new=""
    DO
      IF (substr($ip_old,$i,1) <> " ")
        $ip_new=$ip_new+substr($ip_old,$i,1)
      ELSE
        $ip_new=$ip_new+"0"
      ENDIF
      $i=$i+1
    UNTIL ($i > 15)
  ELSE
    $ip_new="xxx.xxx.xxx.xxx"
  ENDIF
  $x=$x+" "+$ip_new

  IF (len(@address) = 0)
    $address="xxxxxxxxxxxx"
  ELSE
    $address=@address
  ENDIF
  $x=$x+" "+$address
; *
; Variablen deklarieren
; *
;
$FileServer="pdcsrv01"
; ### Name des Servers auf welchem sich die Freigaben befinden
; ### alternativ kann auch natürlich auch eine IP-Adresse angegeben werden
;
$ProtokollServer="pdcsrv01"
; ### Name des Servers auf welchem die Freigabe für die Dokumentation
; ### der An- und Abmeldungen sowie der Rechner Infos liegt
;
$PrintServer="cadsrv01"
; ### Name des Servers auf welchem (falls vorhanden) die Drucker
; ### eingerichtet und freigegeben sind die verbunden werden sollen
;
;
; *
; Hardware Informationen auslesen
; *
;
$DFREESPACETOTAL=(GETDISKSPACE("C:\"))
? "Freier speicher : "+ $DFREESPACETOTAL
;
;
; ### Ausgabe auf die Datei "Rechnername_info.txt" umleiten anstelle des Bildschirmes
$result=ReDirectOutput ("C:\admin\kix\"+@Hostname+"_info.txt" ,0)
;
; ### Ab jetzt werden alle Printanweisungen in die Datei "Rechnername_info.txt" ausgegeben
? @DATE+","+@TIME+","+@WKSTA+","+@USERID+","+@FULLNAME+","+@PRODUCTTYPE+","+@CPU+","+MemorySize(0)+","+@DOMAIN+","+$address+","+$ip_new
Exit



This ist me current script the most ist still under construction and will be send to one log file later.

Pls can anyone help me?

thx a lot
Back to top
View user's profile Send private message
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Tue Oct 16, 2007 11:47 am    Post subject: Reply with quote

You will get a better response by usig the KiXtart forum found at http://www.kixtart.org

Do a search there and you will most likely find several answers.

_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Mart
KiXforms Regular
KiXforms Regular


Joined: 03 Oct 2005
Posts: 57
Location: Rotterdam - Netherlands

PostPosted: Mon Oct 22, 2007 9:20 pm    Post subject: Reply with quote

WMI is your friend in this case.
On most systems (HP, Dell, etc...) you can get this tuff from the BIOS using WMI. If you use custom build systems (read: build with stuff from the shop around the corner) stuff could get a bit trickier because the bios of a mainboard sold in regular stores often does not hold that much valuable information.

_________________
Mart

- He's chained forever to a world that's departed.....It's not enough, it's not enough - Sorrow by Pink Floyd.
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Tue Oct 23, 2007 6:49 am    Post subject: Reply with quote

Oi guys,

I answered almost any question over here

Wink

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Gargoyle
KiXforms Aficionado
KiXforms Aficionado


Joined: 30 Dec 2003
Posts: 366
Location: Arizona

PostPosted: Tue Oct 23, 2007 12:19 pm    Post subject: Reply with quote

Now just have to learn how to read ..... (insert language of choice here)
_________________
Parents were invented to make children happy by giving them something to ignore.
Back to top
View user's profile Send private message
Mart
KiXforms Regular
KiXforms Regular


Joined: 03 Oct 2005
Posts: 57
Location: Rotterdam - Netherlands

PostPosted: Tue Oct 23, 2007 9:06 pm    Post subject: Reply with quote

My German isn't that good (my reading is better then my writing) but by the looks of things all is OK now. Right?
_________________
Mart

- He's chained forever to a world that's departed.....It's not enough, it's not enough - Sorrow by Pink Floyd.
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Wed Oct 24, 2007 6:46 am    Post subject: Reply with quote

Well, it runs now and its management conformity is also given Wink
_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group