<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>espresso3389</author_name>
  <author_url>https://blog.hatena.ne.jp/espresso3389/</author_url>
  <blog_title>espresso3389の日記</blog_title>
  <blog_url>https://espresso3389.hatenablog.com/</blog_url>
  <categories>
    <anon>Win32</anon>
  </categories>
  <description>管理者のコマンドプロンプトでしか動かないバッチファイルの先頭で、ユーザーが管理者かどうかを確認する方法。コマンドとしては、 whoami /groupsで十分で、中に、BUILTIN\Administratorsとか、Mandatory Label\High Mandatory Levelがあることを確認すれば良い。で、バッチファイルで書くとどうすべきかという話。 @echo off for /f &quot;tokens=1 delims=,&quot; %%i in ('whoami /groups /FO CSV /NH') do ( if &quot;%%~i&quot;==&quot;BUILTIN\Administrators&quot; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fespresso3389.hatenablog.com%2Fentry%2F2012%2F07%2F05%2F182414&quot; title=&quot;バッチファイルが管理者で起動されているかどうかを確認する - espresso3389の日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-07-05 18:24:14</published>
  <title>バッチファイルが管理者で起動されているかどうかを確認する</title>
  <type>rich</type>
  <url>https://espresso3389.hatenablog.com/entry/2012/07/05/182414</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
