Get the execution path of the current applicationTag(s): Powerscript


[PB external function declaration]
FUNCTION int GetModuleFileNameA(&
           ulong hinstModule, &
           REF string lpszPath, &
           ulong cchPath) LIBRARY "kernel32"

[Powerscript]
string ls_Path
unsignedlong lul_handle

ls_Path = space(1024)

lul_handle = Handle(GetApplication())
GetModuleFilenameA(lul_handle, ls_Path, 1024)
MessageBox("CURRENT APPLICATION PATH", ls_Path)

blog comments powered by Disqus