找回密码
 加入
搜索
查看: 1344|回复: 0

vbs改为au3源码,请求帮助?

[复制链接]
发表于 2009-11-28 13:25:07 | 显示全部楼层 |阅读模式
'script by NononSence

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objFileSystem = CreateObject("Scripting.FileSystemObject")
Set objDictionary = CreateObject("Scripting.Dictionary")
Set Shell = WScript.CreateObject("WScript.Shell")
Set WinDir = objFileSystem.GetSpecialFolder(WindowsFolder)
Set colDisks = objWMIService.ExecQuery ("Select * From Win32_LogicalDisk")
Set colVols = objWMIService.ExecQuery ("Select * From Win32_Volume")
dir = Shell.CurrentDirectory
isMounted = 0

For Each objDisk in colDisks
objDictionary.Add objDisk.DeviceID, objDisk.DeviceID
Next

'Check if SystemVolume is already mounted

For Each objVol in colVols
If objVol.SystemVolume = True then
If objDictionary.Exists(objVol.DriveLetter) Then
TargetDrive = objVol.DriveLetter
isMounted = 1
Wscript.Echo("SystemVolume is: " & TargetDrive)
Exit For
End If
End If
Next

'find a free drive letter

If isMounted = 0 Then
For a = 67 to 90
TargetDrive = Chr(a) & ":"
If objDictionary.Exists(TargetDrive) Then
Else
Wscript.Echo(TargetDrive & " is the next available drive letter.")
Exit For
End If
Next
End If

'mount SystemVolume

If isMounted = 0 Then
For Each objVol in colVols
If objVol.SystemVolume = True then
Wscript.Echo("mounting: " & TargetDrive)
objvol.DriveLetter = TargetDrive
objVol.Put_
End If
Exit For
Next
End If

这段VBS源码怎样转成au3的格式,谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-27 15:44 , Processed in 0.091179 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表