If you want the SID of the locally logged on user, you might want to use something like user2sid %USERNAME%. That will report back the SID of the currently logged on user of the local computer. I’m not sure if this is what you are trying to achieve or not, however, you should be able to save that information to a variable to use in your login script (I’m assuming this is what you want to do).
Don
Discuss This Question: