Results 1 to 4 of 4

Thread: [RESOLVED] [2008] Preventing form from loading unless specific file exists

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Resolved [RESOLVED] [2008] Preventing form from loading unless specific file exists

    How can I prevent my form from running unless a specific file is on
    the users pc? I need to make sure it's my software and not any exe
    with the same name? Perhaps a md5 hash check or something? So far
    this is all I have but want to have a better check or prevent the software
    from running.

    VB Code:
    1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         If My.Computer.FileSystem.FileExists("C:\Program Files\XYZ\xyz.exe") Then
    3.             Me.Show()
    4.         Else
    5.             MsgBox("You Need To Install XYZ To Continue")
    6.             Application.Exit()
    7.         End If
    8.     End Sub
    Last edited by cmmorris1; Oct 2nd, 2008 at 10:34 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width