Personal tools
You are here: Home Inventory and SLM Quick and dirty - Machine SID into Inventory

Quick and dirty - Machine SID into Inventory

by Jesse McCoppin last modified 2008-03-03 08:29

Use Sysinternals' PSGETSID and a batch file to insert Machine SID into registry.

I am SURE there is a better way to do this, but I don't know much in the way of programming languages, so this is how I did it with a batch file and standard Windows tools.

The Machine SID will be inserted into the Registry so LANDesk can pick it up with the next inventory scan.

I wrapped PSGETSID.EXE and the .BAT file into a Self-Extracting EXE (WinRAR).  It extracts to %TEMP% so no files get left behind when it's done.

Contents of BAT file:

@ECHO OFF
psgetsid -accepteula > .\GOTSID.TXT
findstr /v "SID FOR" .\GOTSID.TXT > .\MYSID.TXT
set /P MACHINE_SID=<.\MYSID.TXT
reg add "HKLM\Software\Intel\LANDesk\Inventory\Custom Fields" /v MACHINE_SID /t REG_SZ /d %MACHINE_SID% /f

 

Server Says:
BOFH excuse #45:

virus attack, luser responsible
Safety First!
62 Days without a Dumpster fire.
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: