Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting the EXE name
Message
De
31/07/2007 13:20:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
31/07/2007 11:43:22
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01244877
Message ID:
01244919
Vues:
18
>>Application.ExecutablePath
>
>Yes, but this returns a full path. With the following, I was able to extract it down to the EXE:
>
>
>                    ' Full path of the application
>                    cFullPath = System.Windows.Forms.Application.ExecutablePath
>
>                    ' Get it into FileInfo
>                    loFileInfo = New System.IO.FileInfo(cFullPath)
>
>                    ' Application name
>                    cApplicationName = loFileInfo.Name
>
Probably I didn't understand what you want. Then use static System.IO.Path class to get any part of it as you want.:

System.IO.Path.GetDirectoryName(fileName));
System.IO.Path.GetExtension(fileName));
System.IO.Path.GetFileName(fileName));
System.IO.Path.GetFileNameWithoutExtension(fileName));
System.IO.Path.GetFullPath(fileName));
System.IO.Path.GetPathRoot(fileName));

etc.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform