At 06:31 2018-05-02, Charlie-gm <ccbible...@gmail.com> wrote:
Maybe take a look at "_VFP.servername". That returns a character string of the .exe (including path) that is being executed.

Example:
my_exe_file = _vfp.servername

I don't think this will work if you are running ".app" files - in that case it may always return the path to the VFP9.exe executable. But if you run that line of code within a compiled VFP .exe, you should always get the path/name of the .exe (assuming that is what you're after here).

     I need the name for using Adobe's print to PDF printer driver.  My code:

      * What is the name of executable that CBS2 is running under?
      * This is needed by the PDF reporting code.
      local sys16name, apptype, underruntime, vfpexename
      sys16name=sys(16,1)
      apptype=upper(right(sys16name,4))
      underruntime=version(2)=0
      vfpexename=_vfp.fullname
      do case
      case apptype=".FXP"     && .FXP under VFP development
         this.appexename=vfpexename
      case apptype=".EXE" and !underruntime     && .EXE under VFP development
         this.appexename=vfpexename
      case apptype=".EXE" and underruntime     && .EXE under VFP runtime
         this.appexename=sys16name
      otherwise     && unknown
         this.appexename=vfpexename
         endcase

[snip]

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/0914d563483fe650d4ab6a4f237c2e0d@mtlp000087
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to