Skip to content

Deleting files in vb.net

Nick Snyder

Asked Jul 18, 2007, 2:22 PM EDT1 answer
Share
LinkedInX
I have a small program that's only purpose is to delete another executable in the startup menu. Dim user As String = SystemInformation.UserName Dim firstpart As String = "c:\documents and settings\" Dim third As String = "\Start Menu\Programs\startup\LP2007.exe" Dim full As String = firstpart & user & third System.IO.File.Delete(full) While this works fine on my computer that i'm developing on, when i go to test this on a different machine I get a fatal error saying that it can't find the specified file. Can anyone shed some light as to why this is happening? Thanks

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    echo full out on the test machine, and check whats wrong with the file path the code is fine, so cant really advise there
    0