回复 12# 令狐大虾 #include <MsgBoxConstants.au3>
#include <Array.au3>
#include <File.au3>
#include <Process.au3>
If FileExists(@TempDir & "\disk") = 0 Then _FileCreate(@TempDir & "\disk")
$file = _FileCreate(@TempDir & "\disk\list.txt")
$file1 = FileOpen($file, 1)
FileWrite(@TempDir & "\disk\list.txt", "list vol")
_RunDos("cmd.exe /c diskpart.exe /s " & @TempDir & "\disk\list.txt >"& @TempDir & "\disk\123.txt")
Local $aArray = FileReadToArray(@TempDir & "\disk\123.txt")
Local $asd = _ArrayFindAll($aArray, " C ", Default, Default, 1, 1, 2)
$ss = StringStripWS($aArray[$asd[0]], 8)
Local $sss = StringRight($ss, 2)
If $sss == "启动" Then
MsgBox(0,"","当前为UEFI启动")
Else
msgbox(0,"","当前为MBR启动")
EndIf
|