Paulo Paulo - 1 year ago 68 Question

How can I make an application run with one specific name?

I want my application to run by a certain name, example:"Coisinho.exe" and if they change it to any other name, it would be a "violation of the software" because it is supposed to be named that way so that the other components work properly. Basically if they the change application name I want it to shutdown right after.

Answer Source
If System.AppDomain.CurrentDomain.FriendlyName <> "Coisinho.exe" Then
    Application.Exit()  /// in a console-app: Environment.Exit(1)
End If
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download