Announcement

Collapse
No announcement yet.

Get the Path location of the application

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Centauri Soldier
    replied
    Use my GlobalPaths plugin. The global variable which stores that value is _ExeFolder.

    Leave a comment:


  • telco
    replied
    colc im thinking about replacing my main exe while it is open it is posible?
    im in my mind is example if my application is running an performing a download of the updated exe, now when its done i will extract the downloaded file and update the exe by replacing it from the downloaded one.. is it possible? restart the app then replace then reopen by code?

    Leave a comment:


  • telco
    replied
    i will check also you example. thank you so much...

    Leave a comment:


  • telco
    replied
    Hi colc, i tried this and it works also
    path = _SourceFolder.."\".._SourceFilename;

    Leave a comment:


  • colc
    replied
    here's a demo
    sfx.zip

    Leave a comment:


  • colc
    replied
    maybe this -

    Code:
    --[[the SFXSOURCE argument is always the last table item so you can access it with Table.Count
    heres what i use
    --Place in Globals
    --the SFXSOURCE argument is always the last table item so you can access it with Table.Count]]
    function EXESourceFolder()
    if _CommandLineArgs[Table.Count(_CommandLineArgs)] then
    if String.Left(_CommandLineArgs[Table.Count(_CommandLineArgs)], 3) == "SFX" then
    local strPath = String.Replace(_CommandLineArgs[Table.Count(_CommandLineArgs)], "SFXSOURCE:", "", true)
    strPath = String.SplitPath(strPath)
    return strPath.Drive..strPath.Folder
    end
    end
    end
    
    -- usage
    Source=EXESourceFolder()
    if Source == "" then
    Source=_SourceFolder
    end
    Cheers

    Leave a comment:


  • telco
    started a topic Get the Path location of the application

    Get the Path location of the application

    Hi, i have this function save before but cannot find it anymore.. can anyone share/help me how to get the specific file location of my autorun.exe?

    example on show dialog will display "C:\\MyProject\autorun.exe"

    report will change if the file is move to another locations..


    Thanks
Working...
X