0087デフォルトの名無しさん
2017/11/28(火) 03:07:29.93ID:1MUOG7l8Windows Vista以降なら whoami コマンドを使って
実行中のユーザが管理者権限を持ってるかチェックする方法もある
※ "Mandatory Label\High Mandatory Level" グループがあれば [管理者として実行] の状態
Set WshShell = WScript.CreateObject("WScript.Shell")
ret = WshShell.Run("cmd /c whoami /groups | find /I ""Mandatory Label\High Mandatory Level""", 0, true)
if ret = 0 then
MsgBox "管理者"
else
MsgBox "非管理者"
end if