I recently read an Advisor tip on creating shortcuts that recomended using Windows Sripting Host object. The code was written in VB and I wanted to convert it to VFP code. I can't seem to create an instance of this class in VFP. Here is the VB code:
Dim strDesktop As String
Dim shl As IWshShell_Class
Dim sct As IWshShortcut_Class
Set shl = New IWshShell_Class
strDesktop = shl.SpecialFolders("Desktop")
Set sct = shl.CreateShortcut(strDesktop & _
"\Notepad.lnk")
sct.TargetPath = "Notepad.exe"
sct.Description = "Start Notepad"
sct.Save
Set sct = Nothing
Set shl = Nothing
I found the library using the VB object browser and tried the following in VFP:
o = createobject("IWshRuntimeLibrary.IWshShortcut_Class")
VFP says it can't find this class?
Thanks in advance or I hope this helps!
[STS]
:>