Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting the EXE name
Message
From
31/07/2007 13:20:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
31/07/2007 11:43:22
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244877
Message ID:
01244919
Views:
17
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform