|
本帖最后由 awfymwvf 于 2010-5-25 14:14 编辑
点击“判断”,提示这是第几块硬盘上的第几个分区,能实现吗?
在用了SETUPAPI。AU3之后,单独运行没事。加到我的程序中就会有如下的提示,我知道,在原贴中说是误报的,但是我实在是不想看到这个提示,有什么办法可以解决吗?
刚才又发现,用SETUPAPI。AU3。C盘得到的是0-1,而D盘就是0-3了,这是为什么呢,获取的值不对啊?
错误是D:\autoit3\Include\LocalSecurityAuthority.au3(43,109) : ERROR: $SE_CREATE_TOKEN_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CREATE_TOKEN_NAME") Then Global Const $SE_CREATE_TOKEN_NAME = "SeCreateTokenPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(44,128) : ERROR: $SE_ASSIGNPRIMARYTOKEN_NAME previously declared as a 'Const'
If Not IsDeclared("SE_ASSIGNPRIMARYTOKEN_NAME") Then Global Const $SE_ASSIGNPRIMARYTOKEN_NAME = "SeAssignPrimaryTokenPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(45,106) : ERROR: $SE_LOCK_MEMORY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_LOCK_MEMORY_NAME") Then Global Const $SE_LOCK_MEMORY_NAME = "SeLockMemoryPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(46,115) : ERROR: $SE_INCREASE_QUOTA_NAME previously declared as a 'Const'
If Not IsDeclared("SE_INCREASE_QUOTA_NAME") Then Global Const $SE_INCREASE_QUOTA_NAME = "SeIncreaseQuotaPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(47,124) : ERROR: $SE_UNSOLICITED_INPUT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_UNSOLICITED_INPUT_NAME") Then Global Const $SE_UNSOLICITED_INPUT_NAME = "SeUnsolicitedInputPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(48,118) : ERROR: $SE_MACHINE_ACCOUNT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_MACHINE_ACCOUNT_NAME") Then Global Const $SE_MACHINE_ACCOUNT_NAME = "SeMachineAccountPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(49,83) : ERROR: $SE_TCB_NAME previously declared as a 'Const'
If Not IsDeclared("SE_TCB_NAME") Then Global Const $SE_TCB_NAME = "SeTcbPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(50,98) : ERROR: $SE_SECURITY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SECURITY_NAME") Then Global Const $SE_SECURITY_NAME = "SeSecurityPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(51,115) : ERROR: $SE_TAKE_OWNERSHIP_NAME previously declared as a 'Const'
If Not IsDeclared("SE_TAKE_OWNERSHIP_NAME") Then Global Const $SE_TAKE_OWNERSHIP_NAME = "SeTakeOwnershipPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(52,106) : ERROR: $SE_LOAD_DRIVER_NAME previously declared as a 'Const'
If Not IsDeclared("SE_LOAD_DRIVER_NAME") Then Global Const $SE_LOAD_DRIVER_NAME = "SeLoadDriverPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(53,115) : ERROR: $SE_SYSTEM_PROFILE_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SYSTEM_PROFILE_NAME") Then Global Const $SE_SYSTEM_PROFILE_NAME = "SeSystemProfilePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(54,104) : ERROR: $SE_SYSTEMTIME_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SYSTEMTIME_NAME") Then Global Const $SE_SYSTEMTIME_NAME = "SeSystemtimePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(55,132) : ERROR: $SE_PROF_SINGLE_PROCESS_NAME previously declared as a 'Const'
If Not IsDeclared("SE_PROF_SINGLE_PROCESS_NAME") Then Global Const $SE_PROF_SINGLE_PROCESS_NAME = "SeProfileSingleProcessPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(56,128) : ERROR: $SE_INC_BASE_PRIORITY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_INC_BASE_PRIORITY_NAME") Then Global Const $SE_INC_BASE_PRIORITY_NAME = "SeIncreaseBasePriorityPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(57,118) : ERROR: $SE_CREATE_PAGEFILE_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CREATE_PAGEFILE_NAME") Then Global Const $SE_CREATE_PAGEFILE_NAME = "SeCreatePagefilePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(58,121) : ERROR: $SE_CREATE_PERMANENT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CREATE_PERMANENT_NAME") Then Global Const $SE_CREATE_PERMANENT_NAME = "SeCreatePermanentPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(59,92) : ERROR: $SE_BACKUP_NAME previously declared as a 'Const'
If Not IsDeclared("SE_BACKUP_NAME") Then Global Const $SE_BACKUP_NAME = "SeBackupPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(60,95) : ERROR: $SE_RESTORE_NAME previously declared as a 'Const'
If Not IsDeclared("SE_RESTORE_NAME") Then Global Const $SE_RESTORE_NAME = "SeRestorePrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(61,98) : ERROR: $SE_SHUTDOWN_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SHUTDOWN_NAME") Then Global Const $SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(62,89) : ERROR: $SE_DEBUG_NAME previously declared as a 'Const'
If Not IsDeclared("SE_DEBUG_NAME") Then Global Const $SE_DEBUG_NAME = "SeDebugPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(63,89) : ERROR: $SE_AUDIT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_AUDIT_NAME") Then Global Const $SE_AUDIT_NAME = "SeAuditPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(64,127) : ERROR: $SE_SYSTEM_ENVIRONMENT_NAME previously declared as a 'Const'
If Not IsDeclared("SE_SYSTEM_ENVIRONMENT_NAME") Then Global Const $SE_SYSTEM_ENVIRONMENT_NAME = "SeSystemEnvironmentPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(65,112) : ERROR: $SE_CHANGE_NOTIFY_NAME previously declared as a 'Const'
If Not IsDeclared("SE_CHANGE_NOTIFY_NAME") Then Global Const $SE_CHANGE_NOTIFY_NAME = "SeChangeNotifyPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(66,118) : ERROR: $SE_REMOTE_SHUTDOWN_NAME previously declared as a 'Const'
If Not IsDeclared("SE_REMOTE_SHUTDOWN_NAME") Then Global Const $SE_REMOTE_SHUTDOWN_NAME = "SeRemoteShutdownPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(67,92) : ERROR: $SE_UNDOCK_NAME previously declared as a 'Const'
If Not IsDeclared("SE_UNDOCK_NAME") Then Global Const $SE_UNDOCK_NAME = "SeUndockPrivilege"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(130,89) : ERROR: $TOKEN_ADJUST_DEFAULT previously declared as a 'Const'
If Not IsDeclared("TOKEN_ADJUST_DEFAULT") Then Global Const $TOKEN_ADJUST_DEFAULT = 0x80
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(131,87) : ERROR: $TOKEN_ADJUST_GROUPS previously declared as a 'Const'
If Not IsDeclared("TOKEN_ADJUST_GROUPS") Then Global Const $TOKEN_ADJUST_GROUPS = 0x40
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(132,95) : ERROR: $TOKEN_ADJUST_PRIVILEGES previously declared as a 'Const'
If Not IsDeclared("TOKEN_ADJUST_PRIVILEGES") Then Global Const $TOKEN_ADJUST_PRIVILEGES = 0x20
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(133,94) : ERROR: $TOKEN_ADJUST_SESSIONID previously declared as a 'Const'
If Not IsDeclared("TOKEN_ADJUST_SESSIONID") Then Global Const $TOKEN_ADJUST_SESSIONID = 0x100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(134,89) : ERROR: $TOKEN_ASSIGN_PRIMARY previously declared as a 'Const'
If Not IsDeclared("TOKEN_ASSIGN_PRIMARY") Then Global Const $TOKEN_ASSIGN_PRIMARY = 0x01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(135,78) : ERROR: $TOKEN_DUPLICATE previously declared as a 'Const'
If Not IsDeclared("TOKEN_DUPLICATE") Then Global Const $TOKEN_DUPLICATE = 0x2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(137,82) : ERROR: $TOKEN_IMPERSONATE previously declared as a 'Const'
If Not IsDeclared("TOKEN_IMPERSONATE") Then Global Const $TOKEN_IMPERSONATE = 0x4
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(138,70) : ERROR: $TOKEN_QUERY previously declared as a 'Const'
If Not IsDeclared("TOKEN_QUERY") Then Global Const $TOKEN_QUERY = 0x8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(139,85) : ERROR: $TOKEN_QUERY_SOURCE previously declared as a 'Const'
If Not IsDeclared("TOKEN_QUERY_SOURCE") Then Global Const $TOKEN_QUERY_SOURCE = 0x10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(207,79) : ERROR: $GENERIC_READ previously declared as a 'Const'
If Not IsDeclared("GENERIC_READ") Then Global Const $GENERIC_READ = 0x80000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(208,81) : ERROR: $GENERIC_WRITE previously declared as a 'Const'
If Not IsDeclared("GENERIC_WRITE") Then Global Const $GENERIC_WRITE = 0x40000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(209,85) : ERROR: $GENERIC_EXECUTE previously declared as a 'Const'
If Not IsDeclared("GENERIC_EXECUTE") Then Global Const $GENERIC_EXECUTE = 0x20000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit3\Include\LocalSecurityAuthority.au3(210,77) : ERROR: $GENERIC_ALL previously declared as a 'Const'
If Not IsDeclared("GENERIC_ALL") Then Global Const $GENERIC_ALL = 0x10000000
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
dim $Form1,$check4
Opt("GUIOnEventMode", 1)
OnAutoItExitRegister("Quit")
$Form1=GUICreate ( "判断盘符测试", 484, 273,-1,-1,BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetOnEvent($GUI_EVENT_CLOSE, "quit")
GUISetState (@SW_SHOW,$Form1)
$check4=GUICtrlCreateCheckbox("判断F盘是第几块硬盘第几个分区", 20,235,300,25)
GUICtrlSetOnEvent($check4, "check4")
While 1
Sleep(1000)
WEnd
Func check4()
;在这添加分区的信息的代码
EndFunc
Func Quit()
GUISetState(@SW_HIDE)
Exit
EndFunc
|
|