脚本高手请进!!!

来源:百度知道 编辑:UC知道 时间:2024/05/27 02:35:14
求一些实用的脚本,如:
关机的、关闭光驱的等等。。。。。。。

你是说Html里面的VB 脚本还是说的程序的哦?
在VB6.0里生成你所说的功能的代码我倒是晓得一些:

系统的关闭、重启、注销
在窗体中添加
Option Explicit
Private Const EWX_LogOff As Long = 0
Private Const EWX_SHUTDOWN As Long = 1
Private Const EWX_REBOOT As Long = 2
Private Const EWX_FORCE As Long = 4
Private Const EWX_POWEROFF As Long = 8
'
Private Declare Function GetLastError Lib "kernel32" () As Long
Private Declare Function ExitWindowsEx Lib "user32" ( _
ByVal dwOption As Long, ByVal dwReserved As Long) As Long
'
Private Type LUID
UsedPart As Long
IgnoredForNowHigh32BitPart As Long
End Type
Private Type LUID_AND_ATTRIBUTES
TheLuid As LUID
Attributes As Long
End Type
Private Type TOKEN_PRIVILEGES
PrivilegesCount As Long
TheLuid As LUID
Attributes As Long
End Type
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long