dll exe question

G

Guest

Hi all,
I do have a .net dll that needs to call a form from a .net exe.
dim asm as [Assembly] = [Assembly].LoadFrom("MyApp.exe")
MyApp.exe path will be decided when MyApp is installed on the user pc. I
need to be able to set LoadFrom["?"] value based on the user installation
path. This dll is also used in MyApp application. If dll and exe are in one
directory I don't have problem.
Does anyone have any suggestion for this. Thanks in advance.
Roy
 
H

Herfried K. Wagner [MVP]

Roy said:
I do have a .net dll that needs to call a form from a .net exe.
dim asm as [Assembly] = [Assembly].LoadFrom("MyApp.exe")
MyApp.exe path will be decided when MyApp is installed on the user pc. I
need to be able to set LoadFrom["?"] value based on the user installation
path.

Mhm... If the EXE file is copied to the destination computer separately,
there is no way to get its path without scanning the directories/drives for
the file.
 
G

Guest

Dear Herfried,
Is it possible to do this?
1. To write a method in the dll class to get the path for the application
from a text file or table.
2. Install the application.
3. Write path of the application to the text file or database.
Are there other ways to do this?
Thanks again,
Roy

Herfried K. Wagner said:
Roy said:
I do have a .net dll that needs to call a form from a .net exe.
dim asm as [Assembly] = [Assembly].LoadFrom("MyApp.exe")
MyApp.exe path will be decided when MyApp is installed on the user pc. I
need to be able to set LoadFrom["?"] value based on the user installation
path.

Mhm... If the EXE file is copied to the destination computer separately,
there is no way to get its path without scanning the directories/drives for
the file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top