C# : Making an exe to not run directly

前端 未结 4 460
盖世英雄少女心
盖世英雄少女心 2020-12-10 23:12

I need to make the primary .exe unrunnable from it (When you try to start it directly ,you get a message : Cannot start directly,if it runs from the secondary exe (only it,m

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 23:42

    I am not sure if the process name (Process.GetCurrentProcess().ProcessName) would give you the 1st or the second EXE name but you can make the 1st EXE as a DLL and the second as an EXE.

提交回复
热议问题