Copy Shortcut with Batch File
Posted on 2005-03-01
I'm trying to write a batch file that will move the front-end of my db to a user's local machine and place a shortcut on the desktop. I'm able to move the front-end okay but am having trouble creating a shortcut (which specifies .mdw). I'm unable to copy a shortcut file. The code:
copy "\\ServerName\FolderName\DataBaseName.lnk" "C:\Documents And Settings\%username%\desktop\ DataBaseName.lnk"
gives me the error: "The system cannot find the file specified."
I am able to copy other files to/from the specified folders without problem, so it has something to do with the shortcut file type.
Is there a way to create a shortcut with MS DOS commands?
Any help would be appreciated.