Дублировал ваш скрипт для второго ярлыка, вписал пути и значения, выдал ошибку, дело в том что ярлык не один , если можно то по подробней!?
Option Explicit
Dim objDrive
Dim strPath
With WScript.CreateObject("Scripting.FileSystemObject")
For Each objDrive In .Drives
If objDrive.DriveType = 2 Then
strPath = .BuildPath(objDrive.RootFolder.Path, "RSWP\REGEDIT\RegWorkshop\RegWorkshop.exe")
If .FileExists(strPath) Then
With WScript.CreateObject("WScript.Shell")
With .CreateShortcut(WScript.CreateObject("Shell.Application").NameSpace("shell:AppData").Self.Path & "\Microsoft\Internet Explorer\Quick Launch\RegWorkshop.lnk")
.TargetPath = strPath
.IconLocation = strPath & ", 0"
.WorkingDirectory = "%SystemRoot%\system32"
.Save
End With
End With
Exit For
End If
End If
Next
End With
WScript.Quit 0
With WScript.CreateObject("Scripting.FileSystemObject")
For Each objDrive In .Drives
If objDrive.DriveType = 2 Then
strPath = .BuildPath(objDrive.RootFolder.Path, "RSWP\REGEDIT\Regshot\_Regshot.exe")
If .FileExists(strPath) Then
With WScript.CreateObject("WScript.Shell")
With .CreateShortcut(WScript.CreateObject("Shell.Application").NameSpace("shell:AppData").Self.Path & "\Microsoft\Internet Explorer\Quick Launch\Regshot.lnk")
.TargetPath = strPath
.IconLocation = strPath & ", 0"
.WorkingDirectory = "%SystemRoot%\system32"
.Save
End With
End With
Exit For
End If
End If
Next
End With
WScript.Quit 0
Мне по проще, дублировать определённые секции, и редактировать пути!!!
Iska,
С одним ярлыком прошло!!!!