I want to have a executable VBS that run all windows shortcut in the current folder of my VBS. My shortcuts are both Excel and PDF. I've made this code, but i have an error on "WshShell.Run objFile.Path" Other line look working correctly
Dim FSO
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
GetCurrentFolder = FSO.GetAbsolutePathName(".")
Set objFolder = FSO.GetFolder(GetCurrentFolder)
For Each objFile in objFolder.Files
If LCase(Right(objFile.Path, 4)) = ".lnk" Then
WshShell.Run objFile.Path
End If
Next
I want the mother path adapt to VBS, so i can copy past VBS and put it in other folders Thanks