Ok .. I'll throw you a bone ....
You will need to know a couple of things before you can do what you want ...
You need to know the computer name and user name ... these can be retrieved from the system environment ...
USERDOMAIN = computer name
USERNAME = current user
Once you have those, put the two together in this fashion ...
"USERDOMAIN_USERNAME"
Now that you have that, you need to look for this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Syncmgr\ProgressState\USERDOMAIN_USERNAME\SID
The value will be the number you are looking for.