Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check If Executed For First Time. (Simple)
#1
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.
Reply
#2
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
[Image: blanktemplate.png]
Reply
#3
A way I haven't seen that much but works also . Nice stuff .
My only goal is to help other people .
[Image: gNQgw]
How to make a Photo Viewer [HQ]
Reply
#4
Nice. This is great to do. Great work!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [C#] Check If Executed From USB Drive wchar_t 9 3,398 05-31-2011, 12:00 PM
Last Post: Filefinder

Forum Jump:


Users browsing this thread: 1 Guest(s)