Results 1 to 11 of 11

Thread: OLE App.Path problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Question OLE App.Path problem

    Code:
    Private Sub Form_Load()
    MsgBox App.Path
    End
    End Sub
    I complied it as Project1.exe and saved it on the desktop





    I embedded Project1.exe into another project and compiled it as Project2.exe on the desktop



    Obviously the App.Path is no longer pointing to the desktop...




    How can I force the App.Path of the embedded application to be the App.Path of the parent application?
    Attached Images Attached Images   

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: OLE App.Path problem

    By placing them both in the same folder.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Re: OLE App.Path problem

    What do you mean?



    They are both on Desktop

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: OLE App.Path problem

    No, that is not what the msgboxs are telling me.

    There are two separate file paths displayed.

    App.Path refers to the folder where the compiled EXE is residing. Those message boxs indicate Project1 is in one place and Project2 is in another.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Re: OLE App.Path problem

    Project1.exe is embedded inside Project2.exe (not linked)


    And they are both on Desktop



    I guess Project1 is temporarily extracted out of project2.exe and being put inside the temporary folder before being run

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: OLE App.Path problem

    So, there is only one .EXE?

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Re: OLE App.Path problem

    Project2's code


    Code:
    Private Sub Form_Load()
    OLE1.DoVerb
    End
    End Sub

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Re: OLE App.Path problem

    Quote Originally Posted by Hack
    So, there is only one .EXE?

    There are 2 EXEs, which are independent from each other.

    Project1.exe runs as a normal application and msgbox app.path
    Project2.exe runs as an embedded application and msgbox app.path

  9. #9
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: OLE App.Path problem

    Quote Originally Posted by winterslam
    I guess Project1 is temporarily extracted out of project2.exe and being put inside the temporary folder before being run
    And this is why they have difference App.Paths

    I don't know how you are "extracting" project1, but however it is being done needs to be modifed to do the extraction in the App.Path of Project2

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Re: OLE App.Path problem

    Quote Originally Posted by Hack
    And this is why they have difference App.Paths

    I don't know how you are "extracting" project1, but however it is being done needs to be modifed to do the extraction in the App.Path of Project2

    Thanks..
    How can I "extract" project1 in the same path as project2?


    I use OLE1.DoVerb to run the embedded application. Are there any parameters to control the path?

  11. #11
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: OLE App.Path problem

    I don't know. In all my years of VB, I've never use the OLE object.

    Try this experiment though. In standard of using built in windows OS folders, make a new data folder and put your Project2 in there and run it. I would be curious to see where it extracted Project1 to from there.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width