Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Trouver le chemin de l’exécutable d’une application

Utilitaire,Plateforme:,non,edité
{filelink=17887}

using System;
using System.Windows.Forms;
 
class ChemainExecutable
{
    static void Main(string[] args)
    {
        // Lancer la boîte de dialogue 'ouvrir
        OpenFileDialog dialog = new OpenFileDialog();
        dialog.InitialDirectory = Application.StartupPath;
 
        if (dialog.ShowDialog() == DialogResult.OK)
        {
            Console.WriteLine(dialog.FileName);
 
        }
    }
}

No comments yet.

Leave a Comment