Determine working folder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • markstaylor
    Indigo Rose Customer
    • Oct 2003
    • 296

    Determine working folder

    If running my app as a compressed EXE, and using the Folder.GetCurrent I get the temp folder where the file is being run. How can I get the folder of the actual location where the app is located not running from (temp directory).

    My app is installed user specific. There are external files that the app uses. I have even tried _SourceFolder with the same results.

    I have seen other posts about the same thing but with no answer to my example.

    I cannot write to the registry because this file can be used in many different locations.
    Last edited by markstaylor; 05-04-2005, 09:02 PM.
    SELECT * FROM Users WHERE IQ > 0;
    o rows Returned
  • Intrigued
    Indigo Rose Customer
    • Dec 2003
    • 6125

    #2
    Change out the information for your executable of course:

    Code:
    resFile = File.Run("AutoPlay\\Docs\\button.exe", "", "", SW_SHOWNORMAL, false)
    
    strCWF = Folder.GetCurrent()
    	strPath = String.Replace(_CommandLineArgs[1], "SFXSOURCE:", "", true)
    		Dialog.Message("EXE Original Location!", strPath)
    Intrigued

    Comment

    • markstaylor
      Indigo Rose Customer
      • Oct 2003
      • 296

      #3
      That worked great!! Thanks so much I owe you one!!!
      SELECT * FROM Users WHERE IQ > 0;
      o rows Returned

      Comment

      • Intrigued
        Indigo Rose Customer
        • Dec 2003
        • 6125

        #4
        Not at all. I flustered about with this one for a bit myself.

        Now, get that app. out the door! We have a deadline to meet!

        Intrigued

        Comment

        Working...
        X