简体   繁体   English

c#从当前文件路径+文件夹+ exe文件启动.exe文件

[英]c# starting a .exe file from current file path + folder + exe file

Im trying to have a exe file opened on click, its going to be in a subfolder of a file path, I dont want to put in c:\\folder due to file install will be different for each user, I would like to use file path + another folder in that file path to + "file.exe" 我试图在单击时打开一个exe文件,它将放在文件路径的子文件夹中,由于每个用户的文件安装情况不同,我不想放入c:\\ folder,我想使用文件路径+该文件路径中的另一个文件夹+“ file.exe”

Any ideas? 有任何想法吗?

you can use this code smple 您可以使用此代码smple

    static void Main(string[] args)
    {
        Process.Start(<"your file path");
    }

for example if you wish to run notepath++ then 例如,如果您希望运行notepath ++,则

you path will be=@"C:\\Program Files (x86)\\Notepad++\\Notepad++.exe 您的路径将= @“ C:\\ Program Files(x86)\\ Notepad ++ \\ Notepad ++。exe

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM