If not fileexists("C:\Windows\Start Menu\Programs\Startup\program.lnk") Then Call makeshortcut("C:\Windows\Start Menu\Programs\Startup\","MyProgram","C:\apps\program.exe")Code:Public Function fileexists(strfilepathandname As String) As Boolean On Error Resume Next Dim lngcheck As Long If InStr(strfilepathandname$, ".") = 0& Then Let fileexists = False End If Let lngcheck& = Len(Dir$(strfilepathandname$)) If lngcheck& = 0& Then Let fileexists = False Exit Function Else Let fileexists = True End If Exit Function End Function




Reply With Quote