The function getstartpath get the path of executable. Ok.
I need also the name of executable for save a ini file with same name (even if user modify name)...
Is it possible ?
			
			
			
				Use the API function GetModuleFileName
DECLARE "kernel32",GetModuleFileNameA(hmod as UINT,path as STRING,length as INT),INT
string name
GetModuleFileNameA(0,name,255)
print name
			
			
			
				hello,
thanx very much.
here is my code if could help someone :
                def name as STRING
	DECLARE "kernel32",GetModuleFileNameA(hmod as UINT,path as STRING,length as INT),INT
	name=SPACE$(255)
	getmodulefilename(0,name,255)
	name=extractfilename(name)
and filename functions :
sub extractfilename(fname as string),string
                def q,p=1 as INT
	DO 
	q=instr(fname,"\\",p)
	if q 
	p=q+1
	ENDIF
	until q=0
	return right$(fname,len(fname)-p+1)
ENDSUB
sub extractfilepath(fname as string),string
                def q,p=1 as INT
	DO 
	q=instr(fname,"\\",p)
	if q 
	p=q+1
	ENDIF
	until q=0
	return LEFT$(fname,p-1)
ENDSUB
Maybe its a good idea to insert into EB some filename functions.
In Pure Basic there is : GetFilePart / GetPathPart
In BlitzMax : StripDir$ / StripExt$/ ExtractDir$ / ExtractExt$
			
			
			
				Those functions and more are available in Fletchie's "ctl.lib"
You can download it here:
http://www.ionicwind.com/forums/index.php/topic,1608.msg15133.html#msg15133
Larry
			
			
			
				Thanx for the ctl.lib : sounds good.
Must be include into EB...