File Exchange

image thumbnail

GetSID - get unique Windows ID

version 1.0.0.0 (1.38 KB) by Yair Altman
Gets a Window's system SID (unique computer ID)

3 Downloads

Updated 27 Jul 2007

No License

GETSID scans the Windows registry for the SID data, and returns it if found. This is useful in cases where you wish to limit or change functionality for specific computers, and need an identifying ID. It is also a simple example of accessing Window's registry.

GETSID is equivalent to Microsoft's PsGetSid utility (http://www.microsoft.com/technet/sysinternals/utilities/psgetsid.mspx).

GETSID requires Microsoft Windows and works on Matlab 6 and up.

Cite As

Yair Altman (2021). GetSID - get unique Windows ID (https://www.mathworks.com/matlabcentral/fileexchange/15718-getsid-get-unique-windows-id), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

mohammad ibrahim

thank you
a question: si this ID is the computer ID ? if Windows is updated , does this ID change ?
I am searching for a method to identify a "computer ID" that does not change with time even after several years

many thanks

binh23294

Thank you!!!!

Yura Polyachenko

suong Tran

Thank you!!!!

James Kerns

Simple, but just what I needed. Always enjoy Yair's work.

Yair Altman

Urs is correct: the following shortened command get(com.sun.security.auth.module.NTSystem,'DomainSID') returns the same information, using the registry just like this submission. My GetSID submission is much faster (0.5 mSecs vs. 15-20 mSecs on my machine), but the difference is negligible in most conceivable scenarios. Hats off.

urs (us) schwarz

an alternative

import com.sun.security.auth.module.*
s=NTSystem;
% with all the information you need:
% eg,
s.getGroupIDs
get(s,'usersid')
get(s)

just a thought...
us

MATLAB Release Compatibility
Created with R12
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!