Support Forums

Full Version: Check If Executed For First Time. (Simple)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
Public Shared Function IsFirstRun() As [String]
        Dim oWrite As System.IO.StreamWriter
        If Not File.Exists(Application.StartupPath & "\\firstrun.txt") Then
            oWrite = File.CreateText(Application.StartupPath & "\\firstrun.txt")
            IsFirstRun = "First Time Ran"
        Else
            IsFirstRun = "Already Ran."
        End If
    End Function

@ Eve NO.
There is heaps ways to do this. But this is a good way of doing it Smile I justtest using a .ini file or something instead. Just looks more offical. But its great never the less Smile
A way I haven't seen that much but works also . Nice stuff .
Nice. This is great to do. Great work!