我试图让脚本从闪存驱动器执行程序,但它不起作用,这是我的脚本
Set wshShell = wScript.CreateObject("wScript.Shell")
Set objFSO = Createobject("Scripting.FileSystemObject")
For Each objDrive In objFSO.Drives
If objDrive.DriveType = 1 Then
wshShell.run objDrive.DriveLetter & "\ \Autoit\Scripts\Google Chrome\Delete.vbs"
End If
Next
答案 0 :(得分:0)
嗨,大家刚刚通过我自己想出来,所以问题是objDrive.DriveLetter而不是使用那个我使用这个脚本并且工作正常哈哈谢谢
Set wshShell = wScript.CreateObject("wScript.Shell")
Set objFSO = Createobject("Scripting.FileSystemObject")
For Each objDrive In objFSO.Drives
If objDrive.DriveType = 1 Then
wshShell.run ("""\ \Autoit\Scripts\Google Chrome\Delete.vbs""")
End If
Next