Hi All i am facing an issue with Vista.
I have logged in as administrator also but the following line is generating an exception which was working correctly earlier in XP & 2000

" (Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) "

I know its due to the security features added by Vista because when I disable UAC in Vista its working perfectly.

Can anybody help me in this case

I am pasting the whole code


Public Const gsResourceNamespace As String = "NBXCAS"

If gbMultipleAppInstances(gsResourceNamespace) Then
psErrorMessage = "Not allowed to have multiple instances of: " & gsApplicationDisplayName
Call mDisplayStartupError(psErrorMessage, MsgBoxStyle.ApplicationModal + MsgBoxStyle.Exclamation)
End
End If

Public Function gbMultipleAppInstances(ByVal vsWindowCaption As String) As Boolean

Return (UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0)

End Function