Ive wrote a small program to open at startup, but i want to give the user a chance to delete it from showing on startup by clicking a button. But it needs to be compatible on XP, Vista and Windows 7. Is there a line of code which will get the default startup folder path automatically so i can then delete it using my button?
cheers guys. I found it elsewhere. here is the code i used if anyone needs it
Dim startupfolder As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup)
Dim path As String = startupfolder & "\" & "testing.txt"
If System.IO.File.Exists(path) = True Then
MsgBox("File Not Deleted")
Catch ex As Exception