SNTT - How to create a Windows shortcut from LotusScript using Windows Scripting Host calls
Recently I had a need to deploy a Microsoft Access application to a number of users. I needed to give them each their own copy of the database and give them a shortcut to it. There are a number of ways to achieve this, but I decided the easiest would be to just use some Windows Scripting Host calls. Here is a short snippet of code that will get the location of the currently logged in user's My Documents and Desktop folders, copy a file from a network drive (P in this case) to the My Documents, then create a shortcut to it on the user's desktop.
Dim sDesktop AsString Dim sMyDocs AsString
Dim oShell AsVariant Dim oShortcut AsVariant Dim oFS AsVariant
Set oShell =CreateObject("WScript.Shell") Set oFS =CreateObject("Scripting.FileSystemObject")