Public Sub Makeready()
        Dim CurrentVersionFile As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\Memory Freeo Plus Current Version.txt"
        Dim MemoryFreeoPlusVersionWriter As New IO.StreamWriter(CurrentVersionFile, False, System.Text.Encoding.Default)
        Dim StorageFile As String = My.Application.Info.DirectoryPath & "\Process Storage.MemFreoPls"
        Dim MemFreoPlsStorageWriter As New IO.StreamWriter(StorageFile, True, System.Text.Encoding.Default)
        If IO.File.Exists(StorageFile) Then
            MemFreoPlsStorageWriter.Close()
        Else
            MemFreoPlsStorageWriter.Write("")
            MemFreoPlsStorageWriter.Close()
        End If
        If IO.File.Exists(CurrentVersionFile) Then
            Dim read As New IO.StreamReader(CurrentVersionFile)
            Dim Result As String
            Result = read.ReadToEnd()
            Dim currentfileversion As New Version(Result)
            Dim currenAppversion As New Version(Application.ProductVersion)
            If currentfileversion < currenAppversion Then
                MemoryFreeoPlusVersionWriter.Write(Application.ProductVersion)
                MemoryFreeoPlusVersionWriter.Close()
            Else
            End If
        Else
            MemoryFreeoPlusVersionWriter.Write(Application.ProductVersion)
            MemoryFreeoPlusVersionWriter.Close()
        End If
        If FrmOptions.KryptonCheckBoxTopMost.Checked Then
            Me.TopMost = True
        Else
            Me.TopMost = False
        End If
    End Sub

at red color it gives error saying another process is using it why ??

No sorry that didn't help but Ive got it working

Public Sub Makeready()    
        Dim CurrentVersionFile As String = My.Computer.FileSystem.SpecialDirectories.Temp & "\Memory Freeo Plus Current Version.txt"
        Dim StorageFile As String = My.Application.Info.DirectoryPath & "\Process Storage.MemFreoPls"
        Dim MemFreoPlsStorageWriter As New IO.StreamWriter(StorageFile, True, System.Text.Encoding.Default)
        If IO.File.Exists(StorageFile) Then
            MemFreoPlsStorageWriter.Close()
        Else
            MemFreoPlsStorageWriter.Write("")
            MemFreoPlsStorageWriter.Close()
        End If
        If IO.File.Exists(CurrentVersionFile) Then
            Dim read As New IO.StreamReader(CurrentVersionFile, System.Text.Encoding.Default)
            Dim Result As String = read.ReadLine
            If String.IsNullOrEmpty(Result) Then
                read.Close()
                Dim MemoryFreeoPlusVersionWriter As New IO.StreamWriter(CurrentVersionFile, False, System.Text.Encoding.Default)
                MsgBox("Empty")
                MemoryFreeoPlusVersionWriter.Write(Application.ProductVersion)
                MemoryFreeoPlusVersionWriter.Close()
            Else
                read.Close()
                Dim currentfileversion As New Version(Result)
                Dim currenAppversion As New Version(Application.ProductVersion)
                If currentfileversion < currenAppversion Then
                    Dim MemoryFreeoPlusVersionWriter As New IO.StreamWriter(CurrentVersionFile, False, System.Text.Encoding.Default)
                    MemoryFreeoPlusVersionWriter.Write(Application.ProductVersion)
                    MemoryFreeoPlusVersionWriter.Close()
                Else
                End If
            End If
        Else
            Dim MemoryFreeoPlusVersionWriter As New IO.StreamWriter(CurrentVersionFile, False, System.Text.Encoding.Default)
            MemoryFreeoPlusVersionWriter.Write(Application.ProductVersion)
            MemoryFreeoPlusVersionWriter.Close()
        End If
        If FrmOptions.KryptonCheckBoxTopMost.Checked Then
            Me.TopMost = True
        Else
            Me.TopMost = False
        End If
        If Me.CheckBoxAutoUpdtes.Checked Then
            KrypBtnUpdate.PerformClick()
        Else
        End If
    End Sub

So yea thread solved

Edited 4 Years Ago by VB 2012: n/a

This question has already been answered. Start a new discussion instead.