Is it permission related?
Are you 100% the path is correct?
Can you create a shortcut anywhere on the other machine via code?
Just a wild guess.
Jon
>I am trying to programmatically create a shortcut to a file on a server but I keep getting the following error:
>
>OLE IDispatch Exception code 0 from WshShortcut.Save
>
>Unable to Save Shortcut
>
>"\\baker\apps\questpdmhangers\CheckHanger002.LNK"...
>
>Here is my code:
>
>
>cFileName = "\\baker\apps\QuestPDMHangers\CheckHanger.bat"
>cLinkName = "CheckHanger002.LNK"
>cDestination = "\\baker\apps\questpdmhangers"
>
>oShell = CREATEOBJECT('WScript.Shell')
>oLink = oShell.CreateShortcut(cDestination +"\"+ cLinkName)
>oLink.TargetPath = cfilename
>oLink.Arguments = "00001 " + "NL"
>oLink.Save()
>
>
>If I change the cDestination Variable to say "C:\Downloads" which is my local machine ot works fine!
>
>Any ideas?