双击VBS文件系统不会自动弹出UAC窗口是一个很大的问题,因为这大大限制了VBS的功能,很多事情都做不了,怎么解决呢?请看下面的代码 复制代码 代码如下: For Each objOS in GetObject("winmgmts:").InstancesOf("Win32_OperatingSystem") If InStr(objOS.Caption,"XP") = 0 Then If WScript.Arguments.length = 0 Then Dim objShell Set objShell = CreateObject("Shell.Application") objShell.ShellExecute "wscript.exe", Chr(34) & _ WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1 Else Call Main() End If Else Call Main() End If Next