/build/static/layout/Breadcrumb_cap_w.png

Extract the service tag set to system description

I would like a batch file to take the service tag from pc and set it to the system description

0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: RaginX 12 years ago
Orange Belt
1
Hi ddonaldson,

you can get the service tag via wmi, see powershell example below. but i think this is vendor dependent!

Powershell:
Get-WmiObject win32_SystemEnclosure | select serialnumber

kind regards,
raginx

Comments:
  • yes but I also needto change the system description - ddonaldson 12 years ago
Posted by: RaginX 12 years ago
Orange Belt
0
Yeah, not sure if this works. couldn't check this at the moment:
have a look at registry path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lanmanserver\parameters\srvcomment

Comments:
  • you can with for exemple this script in autoit :

    #include
    #include
    #include
    Dim $assettag
    RunWait("cmd.exe /c " & "wmic /node:localhost systemenclosure get smbiosassettag > c:\Temp\assettag.txt", "",@SW_HIDE)
    $file = FileOpen("C:\Temp\assettag.txt", 0)
    $assettag = FileReadLine($file,2)
    FileClose($file)
    RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters", "srvcomment", "REG_SZ", $assettag)
    FileDelete ("C:\Temp\assettag.txt") - nekkar 12 years ago
  • Now this, I'm keeping in my stash. Nice one nekkar. - Roonerspism 12 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ