hblackorby
Programmer
Hi,
My pure VB is a litte rusty from all the ASP do I, but hopefully someone can help me. I'm trying to copy a program link from a CD-ROM to the windows desktop and the start menu.
Private Sub Form_Load()
'On Error GoTo goterror
Dim FSO As FileSystemObject
FileCopy App.Path & "\TDD4.lnk", "c:\windows\desktop\TDD4.lnk"
MsgBox "Copying Menu " & App.Path & "\TDD4.lnk", vbOKOnly, "Copying File..."
Set FSO = CreateObject("Scripting.FileSystemObject"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
If Not FSO.FolderExists("c:\windows\startm~1\programs\tdd4"
Then
FS0.CreateFolder ("c:\windows\startm~1\programs\tdd4"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End If
FileCopy App.Path & "\TDD4.lnk", "c:\windows\start menu\programs\tdd4\TDD4.lnk"
Unload Me
'goterror:
' MsgBox "There was an error setting the link to the desktop.", vbOKOnly, "Error Setting Up Link"
' Unload Me
End Sub
Yes, I have Microsoft Scripting checked as a reference. It is giving me "Object Rquired" when I try to create the folder. Note that the .FolderExists method works fine.
Any help at all would be appreciated. I never have problems with the FSO in ASP, just in VB it seems.
Thanks, Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
My pure VB is a litte rusty from all the ASP do I, but hopefully someone can help me. I'm trying to copy a program link from a CD-ROM to the windows desktop and the start menu.
Private Sub Form_Load()
'On Error GoTo goterror
Dim FSO As FileSystemObject
FileCopy App.Path & "\TDD4.lnk", "c:\windows\desktop\TDD4.lnk"
MsgBox "Copying Menu " & App.Path & "\TDD4.lnk", vbOKOnly, "Copying File..."
Set FSO = CreateObject("Scripting.FileSystemObject"
If Not FSO.FolderExists("c:\windows\startm~1\programs\tdd4"
FS0.CreateFolder ("c:\windows\startm~1\programs\tdd4"
End If
FileCopy App.Path & "\TDD4.lnk", "c:\windows\start menu\programs\tdd4\TDD4.lnk"
Unload Me
'goterror:
' MsgBox "There was an error setting the link to the desktop.", vbOKOnly, "Error Setting Up Link"
' Unload Me
End Sub
Yes, I have Microsoft Scripting checked as a reference. It is giving me "Object Rquired" when I try to create the folder. Note that the .FolderExists method works fine.
Any help at all would be appreciated. I never have problems with the FSO in ASP, just in VB it seems.
Thanks, Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO