Christine123
Programmer
I posted a question about paths with spaces a few days ago. I got a reply to use more quotes which I did. Now I'm getting a new error. This is what I have now:
Call Shortcut("""C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS\FP_DEVEL\Links\meet.lnk""","""C:\Documents and Settings\All Users\Documents\fp_devel\meet.csv""")
Sub Shortcut(LinkFile, CommandLine)
Set WshShell=WScript.CreateObject("WScript.Shell")
Set ShortcutHandle = WshShell.CreateShortcut (LinkFile)
ShortcutHandle.TargetPath = CommandLine
ShortcutHandle.Save
End Sub
I used to have one set of quotes around the paths. Now if I double click on the VBS file (this used to work) I get the error: The shortcut pathname must end with .lnk or .url.
If I try to run this from a BAT file (which is what I need to do), I get the same error I got before: Windows cannot find 'C:\Documents'.
Any other way around this?
Call Shortcut("""C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS\FP_DEVEL\Links\meet.lnk""","""C:\Documents and Settings\All Users\Documents\fp_devel\meet.csv""")
Sub Shortcut(LinkFile, CommandLine)
Set WshShell=WScript.CreateObject("WScript.Shell")
Set ShortcutHandle = WshShell.CreateShortcut (LinkFile)
ShortcutHandle.TargetPath = CommandLine
ShortcutHandle.Save
End Sub
I used to have one set of quotes around the paths. Now if I double click on the VBS file (this used to work) I get the error: The shortcut pathname must end with .lnk or .url.
If I try to run this from a BAT file (which is what I need to do), I get the same error I got before: Windows cannot find 'C:\Documents'.
Any other way around this?