Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim sPath, sFixed, sSkipped, arrArgs
- If WScript.Arguments.Length = 0 Then
- MsgBox "Перетащите на файл скрипта один или несколько ярлыков"
- WScript.Quit
- Else
- sFixed = ""
- sSkipped = ""
- For Each sPath In WScript.Arguments
- If LCase(Right(sPath, 4)) = ".lnk" Then
- With CreateObject("WScript.Shell").CreateShortcut(sPath)
- arrArgs = Split(.Arguments)
- Redim Preserve arrArgs(Ubound(arrArgs) + 1)
- arrArgs(Ubound(arrArgs)) = "--ignore-certificate-errors"
- .Arguments = Join(arrArgs)
- .Save
- End With
- sFixed = sFixed & sPath & vbCrLf
- Else
- sSkipped = sSkipped & sPath & vbCrLf
- End If
- Next
- MsgBox "Исправлены: " & vbCrLf & vbCrLf & sFixed & vbCrLf & vbCrLf & "Пропущены: " & vbCrLf & vbCrLf & sSkipped
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement