Is it possible to create a button which when clicked will add a web link to the windows desktop? I am not familiar enough with lotus script to figure this out. Thanks for any responses
Subject: Create Desktop Icon
Create a mail message with the .url attached. Creat a button in the maill message with this code to add the shortcut to the desktop and favorites.Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
Dim path1 As Variant
Dim path2 As Variant
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Set rtitem = doc.GetFirstItem( "Body" )
Set object= rtitem.GetEmbeddedObject( "yourwebsite.url" )
path1=Evaluate("@RegQueryValue(""HKEY_CURRENT_USER"";""Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"";""Desktop"")")
path2=Evaluate("@RegQueryValue(""HKEY_CURRENT_USER"";""Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"";""Favorites"")")
Call object.ExtractFile(path1(0)+"\yourwebsite.url")
Call object.ExtractFile(path2(0)+"\yourwebsite.url")
Msgbox "Thank you",MB_OK,"The links have been added."
End Sub
Subject: RE: Create Desktop Icon
Chuck, thanks very much, this is exactly what I needed. I did need to make one little change:
Call object.ExtractFile(path1(0)+“\yourwebsite.url”)
Call object.ExtractFile(path2(0)+“\yourwebsite.url”)
Had to add the extra backslash on these 2 lines for this to work
Thanks again!
Subject: Maybe these links will help or point you in the right direction
I googled creating shortcuts and found these:
There is an extra utility called shortcut.exe that can be used for creating shortcuts.
http://www.ss64.com/nt/shortcut.html
There is also another way to do it using the “setup.dll” and an .INF file as shown here:
Some people suggest creating an entry in the computer registry:
http://forums.devshed.com/archive/t-226495/create-shortcut-lnk-using-XP-cmd-batch