title: save wmic useraccount where name to variable
body: <p>How can I save the SID of the current user to variable?
  Based off of a similar question, the current code is as follows:</p>
  
  <pre><code>@echo off
  for /f %%a in ('wmic useraccount where Name='%username%' get SID') do set "usersid=%%a"
  echo %usersid%
  exit /b
  </code></pre>
  
  <p>Is there a way I can save this to the variable %usersid%?
  I believe this is an issue with the '' marks surrounding %username%.</p>